Вы находитесь на странице: 1из 1

Programs on flow control

1. Write a program for print given number is prime number or not using for loop
2. Write a program print Fibonacci series and sum the even numbers. Fibonacci series is
1,2,3,5,8,13,21,34,55
3. Write a program to print n prime numbers and display the sum of prime numbers.
4. Using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/4, .
. . ,1/10
5. Write a program that takes input from the user until the user enters -1. After display the
sum of numbers.
6. Write a program to display the following sequence.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
7. Write a program to display the following sequence.

A
AB
ABC
ABCD
ABCDE
8. Write a program to display the following sequence.

A
BC
DEF
GHIJ
KLMNO
9. Write a program that takes input string user and display that string if string contains at least
one Uppercase character, one Lowercase character and one digit.
10. Write a program to print given number is Armstrong or not.

Вам также может понравиться