Example: Program to add two integers
1 /* - - -- - - -*/
2 /* Program to prnt multipliction table of a number*/
3 #include <stdio.h>
4
5 main()
6 {
7 int number, i,m; /* declaration */
8 printf( "Enter the number\n" ); /* prompt */
9 scanf( "%d", &number); /* read a number */
Outline
1. Variables declaration
2. Input
14
11 do{ /* Starting of loop */
12 m=number*i; /* calculation of m*/
13 printf(“%d, ”, m); /*printing m */
14 }while(i<=10); /* condition testing*/
15
16
17 }
Enter first integer
5
5, 10, 15, 20, 25,30,35,40, 45,50,
2.1 loop starts
2.2 print values
3. Condition testing
4. end
Program Output