Computer Science, asked by ray887553, 11 months ago

wap using for loop to print numbers from 1 to 10 C++ programming​

Answers

Answered by Anonymous
4

Answer:

Sample Solution :-

C++ Code :

#include <iostream>

using namespace std;

int main()

{

   int i;

   cout << "\n\n Find the first 10 natural numbers:\n";

   cout << "---------------------------------------\n";

   cout << " The natural numbers are: \n";

   for (i = 1; i <= 10; i++)  

   {

       cout << i << " ";

   }

   cout << endl;

}

Copy

Sample Output:

Find the first 10 natural numbers:                                    

---------------------------------------                                

The natural numbers are:                                              

1 2 3 4 5 6 7 8 9 10  

hope it helps u

mark me as brainliest

Explanation:

Similar questions