Wednesday, October 27, 2021

Print 1 To 30 Using For Loop in C

 A simple program that I wrote using C programming language that will print 1 to 30 using for loop statement.

  I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Program Listing

#include <stdio.h>



int main()

{

    int counter=0;

    int a=0;

    printf("\n\n");

    printf("\t  Print 1 To 30 Using For Loop in C");

    printf("\n\n\n");

    printf("\t");

for (a=1; a<=30; a+=1) {


          counter++;


         printf("%4d",a);


        


         if(counter == 10){


             


         printf("\n\t");


          counter = 0;


      }

       

     }

  printf("\n\n");

    printf("\t\t\tEnd of Program");

    printf("\n");

}


No comments:

Post a Comment