任务一:
熟悉Visuanl C++ 6.0开发环境的使用
任务二:
完成以下作业,本次作业不用提交
1. 编写程序,在屏幕上显示以下图形
########
######
###
#
2. 编写程序,输入任何的x和y值,显示x2+y2的结果。
注意:本次作业只做练习,不用上传
// 1.编写程序,在屏幕上显示以下图形
#include<iostream>
using namespace std;
int main()
{
cout<<" ########"<<'\n';
cout <<" ######"<<'\n';
cout<<" ###"<<'\n';
cout<<" #"<<'\n';
}
//2. 编写程序,输入任何的x和y值,显示x2+y2的结果。
#include<iostream>
using namespace std;
int main()
{int x , y;
cout<<"请输入X和Y的值,用空格间开"<<'\n';
cin>>x>>y;
x=x*x;
y=y*y;
cout<<'\n'<<"X的平方等于 "<<x<<'\n'<<"Y的平方等于 "<<y<<'\n';
}