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

Exercises Extended

This document contains C programming exercises and examples of different pyramid patterns that can be printed. It discusses writing programs to print prime numbers between 1-300 and the first 15 and 10 alternate prime numbers. It also contains examples of different pyramid patterns that can be printed using asterisks. Finally, it discusses using the getchar() function to read input until the end of file and count the number of characters entered, alphabet characters, digits, uppercase letters, lowercase letters, and vowels.

Uploaded by

Mrinal Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Exercises Extended

This document contains C programming exercises and examples of different pyramid patterns that can be printed. It discusses writing programs to print prime numbers between 1-300 and the first 15 and 10 alternate prime numbers. It also contains examples of different pyramid patterns that can be printed using asterisks. Finally, it discusses using the getchar() function to read input until the end of file and count the number of characters entered, alphabet characters, digits, uppercase letters, lowercase letters, and vowels.

Uploaded by

Mrinal Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

C Programming

Exercise- Home
*** Write a program to print all prime numbers from 1 to 300

*** Write a program to print 1 st 15 prime numbers (2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
31, 37, 41, 43, 47) 51, 59, 61, 67

*** Write a program to print 1st 10 alternate prime numbers (2, 5, 11, 17, 23, 31, 41,
47, 59, 67)

Pyramids:
*
* *
* * *
* * * *
* * *
* *
*

* *
* * * *
* * * * * *
* * * * * * * *

* *
* * * *
* * * * * *
* * * * * * *

* *
* * * *
* * * * * *
* * * * * * * *

* *
* * * *
* * * * * *
* * * * * * *

1
101
10101
1010101

www. v3academyCS .com , +91-9871703397 Page 1


C Programming

www. v3academyCS .com , +91-9871703397 Page 2


C Programming

www. v3academyCS .com , +91-9871703397 Page 3


C Programming

Use getchar() to read till EOF. Find out how any characters were entered, how many
were alphabet, digits, upper, lower, vowels etc

www. v3academyCS .com , +91-9871703397 Page 4

You might also like