06 - C Basics - Revision 1
06 - C Basics - Revision 1
06 – Revision 1
From task
1. Write a program that sums a sequence of integers. Assume that the first integer
read with scanf specifies the number of values remaining to be entered. Your
program should read only one value each time scanf is executed. A typical input
sequence might be 5 100 200 300 400 500 where the 5 indicates that the
subsequent five values are to be summed.
2. Write a program that finds the smallest of several integers. The first integer
entered is the number of integers, if we entered 5 100 200 300 400 500 the
output is 100.
3. Write a program that prints the following pattern using a single printf(“*”)
statement:
*
**
***
****
*****
General revision
6. Program to get two integers and sum all numbers between them.