Thursday, October 21, 2021

Print 1 To 15 Using For Loop in C++

  Machine Problem

   Write a C++ program that will print 1 to 15 numbers    in the screen 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

/*
* for.cpp
* Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
* www.jakerpomperada.com and  www.jakerpomperada.blogspot.com
* jakerpomperada@gmail.com
* Bacolod City, Negros Occidental Philippines

   Machine Problem

   Write a C++ program that will print 1 to 15 numbers
   in the screen using for loop statement.

*/

#include <iostream>


int main()
{

   std::cout <<"\n\n";
   std::cout << "\tPrint 1 To 15 Using For Loop in C++";
   std::cout <<"\n\n";
   std::cout <<"\t";
    for (int a=1; a<=15; a++) {
         std::cout <<" " << a << " ";
    }
   std::cout <<"\n\n";
   std::cout << "\tEnd of Program";
   std::cout <<"\n\n";
}


No comments:

Post a Comment