当前位置:网站首页>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;
}边栏推荐
- MySQL 45 lecture learning notes (VI) global lock
- Uniapp custom environment variables
- Responsive - media query
- Software keywords and process information intercepted by Golden Shield video player
- thread priority
- 响应式——媒体查询
- Lottery system test report
- Tar source code analysis Part 10
- 颈椎、脚气
- JS common time processing functions
猜你喜欢

selenium IDE插件下载安装使用教程

What is the use of cloud redis? How to use cloud redis?

Can the out of sequence message complete TCP three handshakes

Matlab remainder

Download kicad on Alibaba cloud image station

the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty‘
![[number theory] fast power (Euler power)](/img/1e/5d032c8f2e43f553b4543d28ea2a2d.jpg)
[number theory] fast power (Euler power)

ORICO ORICO outdoor power experience, lightweight and portable, the most convenient office charging station

Uniapp applet subcontracting
![[network data transmission] FPGA based development of 100M / Gigabit UDP packet sending and receiving system, PC to FPGA](/img/71/1d6179921ae84b1ba61ed094e592ff.png)
[network data transmission] FPGA based development of 100M / Gigabit UDP packet sending and receiving system, PC to FPGA
随机推荐
【MySQL】数据库视图的介绍、作用、创建、查看、删除和修改(附练习题)
How can the old version of commonly used SQL be migrated to the new version?
Responsive - media query
Redis interview question set
uniapp小程序分包
Su Weijie, a member of Qingyuan Association and an assistant professor at the University of Pennsylvania, won the first Siam Youth Award for data science, focusing on privacy data protection, etc
2022, peut - être la meilleure année économique de la prochaine décennie, avez - vous obtenu votre diplôme en 2022? Comment est - ce prévu après la remise des diplômes?
【GF(q)+LDPC】基于二值图GF(q)域的规则LDPC编译码设计与matlab仿真
notepad++如何统计单词数量
uniapp 自定义环境变量
响应式移动Web测试题
STM32 单片机ADC 电压计算
JS common time processing functions
Mysql 45讲学习笔记(十一)字符串字段怎么加索引
Cervical vertebra, beriberi
selenium IDE插件下载安装使用教程
Realize IIC data / instruction interaction with micro batg135
2022 where to find enterprise e-mail and which is the security of enterprise e-mail system?
tars源码分析之1
11. Dimitt's law