We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
PROGRAM TEST -1 QUESTION BANK 16.
Convert temperature from Celsius to
Fahrenheit or vice versa. 1. Display even number from 2 to 20 using if 17. Find the sum of digits of a given number. and for loop 18. Check if a given number is positive, 2. Find if the entered character is vowel or negative, or zero. not using switch case 19. Print a multiplication table of a given number from 1 to 10 using nested for 3. Display even numbers from 1 to 20 using loops. for loop 20. Determine the grade of a student based on 4. Display numbers divisible by 2 and 5 from marks obtained using nested if-else 1 to 50 statements. 5. Display numbers from 1 to 50 using do 21. Display the following pattern while loop. * ** 6. Add 5 numbers using for loop. Accept the *** numbers from command prompt **** 7. Check if a given number is even or odd 22. Convert a double value to an int using using if statement. typecasting and print the result. 8. Calculate the factorial of a given number 23. Display the following pattern using for loop. 1 9. Check if a given number is prime or not 1 2 using for loop. 1 2 3 10. Reverse a given number using for loop. 1 2 3 4 11. Find the maximum among three numbers. 24. Implement a menu-driven program to 12. Find day of the week using switch case perform basic arithmetic operations (addition, 13. Check if a given character is a vowel or subtraction, multiplication, division) using switch consonant. case. 14. Find the largest among three numbers. 25. Determine the eligibility of a candidate for 15. Check if a given number is a palindrome voting based on age and nationality using nested if- or not. else statements. 37. Convert temperature from Celsius to Fahrenheit or vice versa. PROGRAM TEST -1 QUESTION BANK 38. Find the sum of digits of a given number. 39. Check if a given number is positive, 22. Display even number from 2 to 20 using if negative, or zero. and for loop 40. Print a multiplication table of a given 23. Find if the entered character is vowel or number from 1 to 10 using nested for not using switch case loops. 24. Display even numbers from 1 to 20 using 41. Determine the grade of a student based on marks obtained using nested if-else for loop statements. 25. Display numbers divisible by 2 and 5 from 42. Display the following pattern 1 to 50 * 26. Display numbers from 1 to 50 using do ** while loop. *** **** 27. Add 5 numbers using for loop. Accept the 22. Convert a double value to an int using numbers from command prompt typecasting and print the result. 28. Check if a given number is even or odd 23. Display the following pattern using if statement. 1 29. Calculate the factorial of a given number 1 2 using for loop. 1 2 3 30. Check if a given number is prime or not 1 2 3 4 using for loop. 24. Implement a menu-driven program to 31. Reverse a given number using for loop. perform basic arithmetic operations (addition, 32. Find the maximum among three numbers. subtraction, multiplication, division) using switch 33. Find day of the week using switch case case. 34. Check if a given character is a vowel or 25. Determine the eligibility of a candidate for consonant. voting based on age and nationality using nested if- 35. Find the largest among three numbers. else statements. 36. Check if a given number is a palindrome or not.