0% found this document useful (0 votes)
3 views

codeQuestion2

Uploaded by

unicornpeppy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

codeQuestion2

Uploaded by

unicornpeppy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1)Write a program to print the following pattern.

Accept number of rows from user and

display that much number of rows in output.

01

101

0101
2)Write a program to print the following pattern. Accept number of rows from user and

display that much number of rows in output.

23

456

7 8 9 10
4)Write a program to find sum of digits of number?
5)Write a C program to display the Fibonacci series of n terms.

Take the value of n from the user.


6) Write a program to print the following pattern for number of rows given by the

user.

21

321

4321
Home work

7) Write a program to display all prime numbers from 1 to 50.

8) Write a program to accept number of rows from user and display following

patterns for expected number of rows.

1234

123

12

You might also like