wzoi.cc大礼包!!!!!#1 10题一期

第一次给大家做大礼包,1-50题,感谢观看,为了防止丢失,点个赞,加个收藏!关注下我!

10个代码一期

#1

网址:wzoi.cc   上网搜!

不定时更新,需用可以借鉴!

制作不易,点个赞+收藏+关注---三键三连!

答案:
“Hello World!” :
#include <bits/stdc++.h>    	//包括输入输出流的iostream库 
using namespace std;	//默认使用std名字空间 

int main()		//程序执行的入口处,main函数返回整数 
{
	cout << "Hello World!";		//注意输出流的方向,每条语句以分号结束。 
    return 0;		//程序运行完返回0,表示正常结束,这条语句可省略。 
}
打印very good

 

#include <iostream>    	
using namespace std;	

int main()	
{
		cout<<"**************************"<<endl;
		cout<<"         Very    Good!"<<endl;
		cout<<"**************************";
			return 0;
}
默写数字

 

#include <iostream>    	
using namespace std;	

int main()	
{
	int a;
	cin>>a;
	cout<<a<<endl;
			return 0;
}
A+B Problem

 

#include <iostream>    	
using namespace std;	

int main()	
{
	int a,b,c;
	cin>>a>>b;
	c=a+b;
	cout<<c;
			return 0;
}
输出第二个整数

 

#include <iostream>    	
using namespace std;	

int main()	
{
	int a,b,c;
	cin>>a>>b>>c;
	cout<<b;
			return 0;
}

 求一个数的前后两个数

#include <iostream>    	
using namespace std;	

int main()	
{
	int a,b;
		cin>>a>>b;
	cout<<a-b;
	cout<<endl;
	cout<<a+b; 

			return 0;
}

竖式计算

#include <bits/stdc++.h>
using namespace std;

int main() {
	int a,b,c;
	cin>>a>>b;
	c=a+b;
	cout<<setw(10)<<a<<endl;
	cout<<setw(4)<<"+";
	cout<<setw(6)<<b<<endl;
	cout<<"-----------"<<endl;
	cout<<setw(10)<<c;
	return 0;     
}

植树造林

#include <iostream>    	
using namespace std;	

int main()	
{
	int a,b;
	cin>>a>>b;
	cout<<a*b;

			return 0;
}

 求自行车总价

#include <iostream>    	
using namespace std;	

int main()	
{
int a,b;
cin>>a;
b=a*300;
cout<<b;
			return 0;
}

正方形边长

#include<bits/stdc++.h>
using namespace std;

int main()
{
	int bianchang;
	cin>>bianchang;
	cout<<bianchang*bianchang;
		return 0;
}

第一期 就到这,下面几期看我的个人中心!

 

 

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值