1.

Write an algorithm to print first 10 multiples of 2

Answer»

The C PROGRAM for GIVEN question is as FOLLOWS :-

#INCLUDE

int MAIN()

{

   int i;

   for(i=2; i<=20; i=i+2)

       printf("%d\n",i);

}

Now writing the Algorithm for the following Program :-

Step 1 - START

Step 2 - Declare a variable (here i)

Step 3 - for i=2 where i<=20 till i=i+2

                    Print i

Step 4 - STOP



Discussion

No Comment Found