0% found this document useful (0 votes)
62 views1 page

C++ Programming Basics and Exercises

The document contains 4 questions asking to write C++ programs: 1) A program to print a multiplication table from 35 to 65 using for and while loops, with a flowchart. 2) A program named "Aggregate" to calculate and display the sum of values between two integer limits entered by the user, with a message if the limits are the same. 3) A program to calculate the factorial of a given number. 4) A program to print values starting from a start value to an end value in steps of a count value entered by the user.

Uploaded by

Atif Zaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views1 page

C++ Programming Basics and Exercises

The document contains 4 questions asking to write C++ programs: 1) A program to print a multiplication table from 35 to 65 using for and while loops, with a flowchart. 2) A program named "Aggregate" to calculate and display the sum of values between two integer limits entered by the user, with a message if the limits are the same. 3) A program to calculate the factorial of a given number. 4) A program to print values starting from a start value to an end value in steps of a count value entered by the user.

Uploaded by

Atif Zaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Fundamentals of Programming

Lab task#4

Question 1:
Write a complete C++ program which produces a simple multiplication table 569 having starting value 35
up to 65 of the following format using for loop and while loop. Also draw its flow chart.

569 x 35 = 19915
569 x 36 = 20484
...
569 x 65 = 36985

Question 2:
Write a complete C++ program named "Aggregate" that declares two integer variables named lower limit
and upper limit and then calculate and display the sum of all the values between them. If the lower limit
and upper limits have the same values then program should print an appropriate message.

Question 3:
Write a program that calculates factorial of a given number. E.g. 5!= 5x4x3x2x1

Question 4:
Write a code that prints values starting from start and ending at end with the step of count; where
start, end and count are variables entered by user.
Required Output:
Start=3
End = 10
Step =3
3,6,9

You might also like