返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.         int a=0;
  7.         cout<<"the length of the squar : ";
  8.         cin>>a;
  9.         for(int b=a;b>0;b--)
  10.         {
  11.                 for(int c=a;c>0;c--)
  12.                 {
  13.                         cout<<"# ";
  14.                 }
  15.                 cout<<"\n";
  16.         }
  17.         cout<<"the area of the squar is "<<a*a<<"\n";
  18.         system("pause");
  19.         return 0;
  20. }
複製代碼

TOP

返回列表