0% found this document useful (0 votes)
13 views2 pages

Programming Lab (02) - For 2nd 30

Cl aurura

Uploaded by

Md Naqeeb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Programming Lab (02) - For 2nd 30

Cl aurura

Uploaded by

Md Naqeeb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Write a program in C to make such a pattern like a right angle triangle


with a number which will repeat a number in a row.

The pattern like :


1
22
333
4444

2. Write a C program to make such a pattern like a pyramid with a


number which will repeat the number in the same row.
1
2 2
3 3 3
4 4 4 4

3. Write a C program to display the pattern as a pyramid using


asterisks, with each row containing an odd number of asterisks.
*
***
*****

4. Write a program in C to find the number and sum of all integers


between 100 and 200 which are divisible by 9.
Expected Output :
Numbers between 100 and 200, divisible by 9 :
108 117 126 135 144 153 162 171 180 189 198
The sum : 1683
5. Write a program in C to display a pattern like a diamond.
*
***
*****
*******
*********
*******
*****
***
*

6. Write a C program to check whether a number is a palindrome or not.


Test Data :
Input a number: 121
Expected Output :
121 is a palindrome number.

7. Write a C program that calculates the sum of even and odd numbers from 1 to
50 using do-while loops.

8. Write a C program to find the largest of three numbers.


Test Data : 12 25 52
Expected Output :
1st Number = 12, 2nd Number = 25, 3rd Number = 52
The 3rd Number is the greatest among three

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy