当前位置:网站首页>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;
}
边栏推荐
- 2022年,或许是未来10年经济最好的一年,2022年你毕业了吗?毕业后是怎么计划的?
- Mysql 45讲学习笔记(十四)count(*)
- 抽奖系统测试报告
- [FPGA tutorial case 8] design and implementation of frequency divider based on Verilog
- Tar source code analysis 4
- 2022 where to find enterprise e-mail and which is the security of enterprise e-mail system?
- Responsive mobile web test questions
- 【问题记录】03 连接MySQL数据库提示:1040 Too many connections
- 响应式移动Web测试题
- 2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers
猜你喜欢
Responsive - media query
MySQL 45 lecture learning notes (VII) line lock
【问题记录】03 连接MySQL数据库提示:1040 Too many connections
GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式
uniapp 自定义环境变量
Another company raised the price of SAIC Roewe new energy products from March 1
the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty‘
Deep understanding of redis -- a new type of bitmap / hyperloglgo / Geo
2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers
leetcode 310. Minimum Height Trees
随机推荐
【GF(q)+LDPC】基于二值图GF(q)域的规则LDPC编译码设计与matlab仿真
What is the sheji principle?
Latex中的单引号,双引号如何输入?
If there are two sources in the same job, it will be reported that one of the databases cannot be found. Is there a boss to answer
MySQL 45 lecture learning notes (XIII) delete half of the table data, and the table file size remains the same
Deep understanding of redis -- a new type of bitmap / hyperloglgo / Geo
Dimension and format of data
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0
tars源码分析之4
[network data transmission] FPGA based development of 100M / Gigabit UDP packet sending and receiving system, PC to FPGA
《国民经济行业分类GB/T 4754—2017》官网下载地址
leetcode825. 适龄的朋友
tars源码分析之2
Uniapp applet subcontracting
Bottom problem of figure
How notepad++ counts words
Realize IIC data / instruction interaction with micro batg135
颈椎、脚气
Analysis of tars source code 5
Tar source code analysis 9