当前位置:网站首页>Chapter 1 programming problems
Chapter 1 programming problems
2022-07-04 06:51:00 【Sophomores with a length of one and a half years】
1
#include<iostream>
using namespace std;
int main()
{
cout<<"name: \nAddress: UESTC";
return 0;
}2
#include<iostream>
using namespace std;
int convert(int n);
int main()
{
int n;
cin >> n;
cout<< n <<" long = "<<convert(n)<<endl;
return 0;
}
int convert(int n)
{
return 220 * n;
}3
#include<iostream>
using namespace std;
void mice()
{
cout<<"Three blind mice\n";
}
void amination()
{
cout<<"See how they run\n";
}
int main()
{
mice();mice();
amination();amination();
return 0;
}4
#include<iostream>
using namespace std;
int main()
{
cout<<"Enter your age: ";
int age = 0;
cin>>age;
cout<<"Your age in months is "<<12*age<<".\n";
return 0;
}5
#include<iostream>
using namespace std;
float cconvertf(int c);
int main()
{
cout<<"Please enter a Celsius value: ";
int Celsius = 0;
cin>>Celsius;
cout<<Celsius<<" degrees Celsius is "<<cconvertf(Celsius)<<" degrees Fahrenheit.";
return 0;
}
float cconvertf(int c)
{
return (1.8 * c + 32.0);
}6
#include<iostream>
using namespace std;
long long lconverta(float l);
int main()
{
cout<<"Enter the number of light years: ";
float light = 0;
cin>>light;
cout<<light<<" light years = "<<lconverta(light)<<" astronomical units."<<endl;
return 0;
}
long long lconverta(float l)
{
return 63240 * l;
}7
#include<iostream>
using namespace std;
void showtime(int h, int m);
int main()
{
showtime(9,28);
return 0;
}
void showtime(int h, int m)
{
cout<<"Time: "<<h<<" : "<<m<<endl;
}边栏推荐
猜你喜欢

Wechat applet scroll view component scrollable view area

How notepad++ counts words

【GF(q)+LDPC】基于二值图GF(q)域的规则LDPC编译码设计与matlab仿真

移动适配:vw/vh

The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function

GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式

2022 where to find enterprise e-mail and which is the security of enterprise e-mail system?

Campus network problems

P26-P34 third_ template

leetcode825. 适龄的朋友
随机推荐
Mysql 45讲学习笔记(七)行锁
校园网络问题
Highly paid programmers & interview questions: how does redis of series 119 realize distributed locks?
1、 Relevant theories and tools of network security penetration testing
Campus network problems
11. Dimitt's law
Common usage of time library
抽奖系统测试报告
leetcode825. Age appropriate friends
selenium驱动IE常见问题解决Message: Currently focused window has been closed.
STM32 单片机ADC 电压计算
Background and current situation of domestic CDN acceleration
Tar source code analysis Part 2
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0
移动适配:vw/vh
Boast about Devops
7. Agency mode
What is the sheji principle?
ADC voltage calculation of STM32 single chip microcomputer
Selection (021) - what is the output of the following code?