当前位置:网站首页>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;
}
边栏推荐
- What is the use of cloud redis? How to use cloud redis?
- Responsive mobile web test questions
- notepad++如何统计单词数量
- R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
- 图的底部问题
- P26-P34 third_ template
- 在已经知道表格列勾选一个显示一列
- MySQL 45 lecture learning notes (VI) global lock
- What is the sheji principle?
- Download address of the official website of national economic industry classification gb/t 4754-2017
猜你喜欢
Can the out of sequence message complete TCP three handshakes
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0
Cervical vertebra, beriberi
Wechat applet scroll view component scrollable view area
Matlab remainder
[Android reverse] function interception (CPU cache mechanism | CPU cache mechanism causes function interception failure)
关于IDEA如何设置快捷键集
the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty‘
Uniapp applet subcontracting
Shopping malls, storerooms, flat display, user-defined maps can also be played like this!
随机推荐
Data analysis notes 09
图的底部问题
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?
Fundamentals of SQL database operation
Mysql 45讲学习笔记(十三)表数据删掉一半,表文件大小不变
MySQL 45 lecture learning notes (XIV) count (*)
24 magicaccessorimpl can access the debugging of all methods
Selection (022) - what is the output of the following code?
Download address of the official website of national economic industry classification gb/t 4754-2017
Wechat applet scroll view component scrollable view area
Is the insurance annuity product worth buying? Is there a hole?
11. Dimitt's law
Latex中的单引号,双引号如何输入?
2022 where to find enterprise e-mail and which is the security of enterprise e-mail system?
[backpack DP] backpack problem
selenium IDE插件下载安装使用教程
the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty‘
Uniapp applet subcontracting
Mysql 45讲学习笔记(十二)MySQL会“抖”一下
Code rant: from hard coding to configurable, rule engine, low code DSL complexity clock