C++ Program for Printing Stars

Program Code:

#include<iostream>
using namespace std;
int main()
{
for(int i =0;i<4;i++)
{
for(int j =0;j<4;j++)
cout<<"*";
cout<<endl;
}
return 0;
}

Output:

.exe file

2 comments:

  1. Anonymous10:52 am

    Dont we need to int i and j?

    ReplyDelete
    Replies
    1. no they are just used as a variables in For loops...

      Delete

Please disable your ad blocker to support this website.

Our website relies on revenue from ads to keep providing free content.