当前位置:网站首页>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;
}
边栏推荐
- tars源码分析之5
- selenium IDE插件下载安装使用教程
- 2022 is probably the best year for the economy in the next 10 years. Did you graduate in 2022? What is the plan after graduation?
- tars源码分析之1
- How notepad++ counts words
- JS common time processing functions
- Tar source code analysis Part 2
- What is the sheji principle?
- Analysis of tars source code 1
- Selection (021) - what is the output of the following code?
猜你喜欢
2022 wechat enterprise mailbox login entry introduction, how to open and register enterprise wechat enterprise mailbox?
Can the out of sequence message complete TCP three handshakes
Bottom problem of figure
[Android reverse] function interception (CPU cache mechanism | CPU cache mechanism causes function interception failure)
Cervical vertebra, beriberi
The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function
MySQL 45 lecture learning notes (VII) line lock
颈椎、脚气
leetcode825. Age appropriate friends
期末周,我裂开
随机推荐
响应式移动Web测试题
Another company raised the price of SAIC Roewe new energy products from March 1
Responsive mobile web test questions
[network data transmission] FPGA based development of 100M / Gigabit UDP packet sending and receiving system, PC to FPGA
2022年,或许是未来10年经济最好的一年,2022年你毕业了吗?毕业后是怎么计划的?
云Redis 有什么用? 云redis怎么用?
Redis面试题集
Common usage of time library
Google Chrome Portable Google Chrome browser portable version official website download method
Campus network problems
The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function
内卷怎么破?
Mysql 45讲学习笔记(十二)MySQL会“抖”一下
Summary of leetcode BFS question brushing
【MySQL】数据库视图的介绍、作用、创建、查看、删除和修改(附练习题)
Mysql 45讲学习笔记(七)行锁
STM32 单片机ADC 电压计算
Analysis of tars source code 5
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
P26-P34 third_ template