当前位置:网站首页>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 relearn 2- Alibaba cloud server CentOS installation mysql8.0
- Responsive - media query
- CORS is not intended to protect API endpoints - nikofischer
- Redis面试题集
- Mobile adaptation: vw/vh
- 在已经知道表格列勾选一个显示一列
- Check and display one column in the known table column
- What is Gibson's law?
- Mysql 45讲学习笔记(十三)表数据删掉一半,表文件大小不变
- tars源码分析之2
猜你喜欢

the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty‘

Appium foundation - appium installation (II)

Bottom problem of figure

校园网络问题

MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0

regular expression

centos8安装mysql.7 无法开机启动

2022 wechat enterprise mailbox login entry introduction, how to open and register enterprise wechat enterprise mailbox?

响应式——媒体查询

selenium驱动IE常见问题解决Message: Currently focused window has been closed.
随机推荐
Can the out of sequence message complete TCP three handshakes
How notepad++ counts words
Mysql 45讲学习笔记(十)force index
R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
【网络数据传输】基于FPGA的百兆网/兆网千UDP数据包收发系统开发,PC到FPGA
Lottery system test report
selenium IDE插件下载安装使用教程
在已經知道錶格列勾選一個顯示一列
ABCD four sequential execution methods, extended application
Is the insurance annuity product worth buying? Is there a hole?
tcp socket 的 recv 如何接收指定长度消息?
Redis面试题集
STM32 单片机ADC 电压计算
采用中微BATG135实现IIC数据/指令交互
centos8安装mysql.7 无法开机启动
响应式移动Web测试题
Mysql 45讲学习笔记(六)全局锁
Uniapp custom environment variables
[MySQL] introduction, function, creation, view, deletion and modification of database view (with exercises)
Highly paid programmers & interview questions: how does redis of series 119 realize distributed locks?