[go: up one dir, main page]

0% found this document useful (0 votes)
11 views11 pages

Question

The document outlines a series of programming tasks in C++, including checking for even or odd numbers, finding the greatest and smallest of three user-input numbers, determining leap years, and counting special numbers based on specific criteria. It also includes various patterns to print using loops, as well as conditions for user inputs involving both negative and positive numbers. Overall, it serves as a comprehensive guide for practicing basic programming concepts and control structures in C++.

Uploaded by

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

Question

The document outlines a series of programming tasks in C++, including checking for even or odd numbers, finding the greatest and smallest of three user-input numbers, determining leap years, and counting special numbers based on specific criteria. It also includes various patterns to print using loops, as well as conditions for user inputs involving both negative and positive numbers. Overall, it serves as a comprehensive guide for practicing basic programming concepts and control structures in C++.

Uploaded by

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

Question

• Write a Program in cpp check whether the number are even or odd.
• Take a user input (A, B and C) and find the greatest and smallest
number using if else.
• Write a Program in cpp check whether the year are leap `year` or not.
• Print 1 2 3 4 10 11 12 13 14 14 by using break statements.
• Print 4 9 16 25 36 49 1 2 3 4 5 by using continue statements.
• Write a program to count the special number between 1 and 1000,
where the special number are number have unit place digit are 5.
• Write a Program to count the special number between 1 and 1000,
where the special number are the number have tenth place have digit
4 and 5.
• Write a Program to count the special number between 1 and 10000,
where the special number are the factor of 4 and 6.
• Write a Program to count the special number between 1 and 10000,
where the special number are the factor of 3 and 7.
• Print Pattern :
*
* *
* * *
* * * *
2. * * * * *
* * * *
* * *
* *
*
3. * * * * *
* * * * *
* * * * *
* * * * *
4. *
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
5. 1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6. 1
12
123
1234
12345
7. A
AB
ABC
ABCD
ABCDE
8. 1
23
456
7 8 9 10
11 12 13 14 15
9. 1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
10. *****
****
***
**
*
**
***
****
*****
11 . Take a five number which is the user input such that three number
are negative and rest of them are positive and there sum should be
positive (sum > 50.)

12. Take a five number which is the user input such that sum of any
three number is equal to product of rest of the two number.
13.

You might also like