Questions For Practice
Questions For Practice
Q#2 Write a program that ask user to input a number or character and print ASCII Value in
C++.
Q#3 Write a program to convert days into years and weeks
Q#4 Write a program that ask user to input two integers and find out minimum number
Q#5 Write a program to print positive number entered by the user. If user enters negative
number, it is skipped.
Q#6 Write a program to check whether the number is less than or greater than 10 inputted by
the user.
Q#7 Write a program to check the number entered by the user is even or odd.
Q#8 Write a program to print the following pattern using do while loop.
*
**
***
****
*****
Q#9 Write a program to find Factorial Value of number given by the user, using For Loop
Q#10 Write a program that prints the following pattern
*
***
*****
*******
*********
Q#29 Write a program to add two integers. Make a function add () to add integers and display
sum in main () function.
Q#30 Write a program that asks the user to type a positive integer. When the user types a
negative value the program writes ERROR and asks for another value. When the user
types 0, that means that the last value has been typed and the program must write the
average of the positive integers. If the number of typed values is zero the program writes
'NO AVERAGE'.