Square:
In this post of shapes in c, you will find the code for constructing a square in C++ using "*".
Code:
The code is as follows.
/* Join us athttp://shapesinc.blogspot.comfor more codes of shapes */#include<iostream>using namespace std;int main(){cout << "Join http://shapesinc.blogspot.com for more codes of shapes\n\n";int size=0;cout << "Enter the size of the square\n";cin>>size;for(int i=0; i<size; i++){for(int j=0; j<size; j++)cout << "*";cout<<endl;}}
0 comments:
Post a Comment