当前位置:网站首页>Xiaoqingtai officially set foot on the third day of no return
Xiaoqingtai officially set foot on the third day of no return
2020-11-08 13:52:00 【osc_3vp99iw6】
Xiaoqingtai officially set foot on the road of no return 3 God
Look at the notes before
Look at the current level
I can't help but flow down Regretful Tears
Do your homework. It's fun to do it ( Catch ) Cause ( ear ) Bo ( Scratch ) Bo ( Gill )
I'd like to have my hair pulled out
There's so much bullshit
Well, I'm going to record every simple question that I just can't do TAT
- Given two numbers , Find the greatest common divisor of these two numbers
< I hate common divisors >
#include <stdio.h>
int main()
{
int a,b,c,i;
scanf("%d%d",&a,&b);
if (a < b)
{
c = a; a = b; b = c;
}
for (i = b;i <= a; i--)
{
if (a % i == 0 && b % i == 0)
{
printf(" The greatest common divisor is :");
printf("%d\n",i);
break;
}
}
return 0;
}
- Print 1000 Year to 2000 Leap year between years
< I also hate leap year >
#include <stdio.h>
int main()
{
int i;
printf(" Interval leap years have :");
for(i=1000;i<2001;i+=4)
{
if(i%4==0)
{
printf("%d\n",i);
}
}
return 0;
}
- Calculation 1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 Value , Print out the results
< It's practical to do this problem 40min I'm stone >
Calculation 1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 Value , Print out the results
#include <stdio.h>
int main()
{
int i;
float sum=1;
printf(" The sum of the required items is :");
for(i=2;i<=100;i++)
{
if(i%2==0)
{
sum+=-1.0/i;
}
else{
sum+=1.0/i;
}
}
printf("%f\n",sum);
return 0;
}
- 1 To 100 How many numbers appear in all integers of 9
#include <stdio.h>
int main()
{
int i,j=0;
printf(" Numbers 9 The number of :");
for(i=1;i<101;i++)
{
if(i%10==9)
{
j++;
}
}
printf("%d",j);
return 0;
}
- Print 100~200 The prime between
< prime number = Abnormal number >
#include <stdio.h>
int main()
{
int i,j;
printf(" Prime numbers have intervals :");
for(i=100;i<=200;i++)
{
for(j=2;j<i;j++)
{
if(i%j==0)
{
break;
}
}
if(i==j)
{
printf("%d\n",i);
}
}
return 0;
}
- Output... On the screen 99 Multiplication table
#include<stdio.h>
int main()
{
int i=0;
for(i=1;i<=9;i++)
{
int j=0;
for(j=1;j<=i;j++)
{
printf("%d*%d=%d ",i,j,i*j);
}
printf("\n");
}
return 0;
}
- seek 10 The maximum of integers
#include <stdio.h>
int main()
{
int a[11],i;
for(i=1;i<=10;i++)
{
scanf("%d",&a[i]);
}
a[0]=a[1];
for(i=1;i<=10;i++)
{
if(a[i]>=a[0]) a[0]=a[i];
}
printf(" The maximum value is :");
printf("%d\n",a[0]);
return 0;
}
Total time 120min;
total error n Time ;
Total collapse n+1 Time ;
版权声明
本文为[osc_3vp99iw6]所创,转载请带上原文链接,感谢
边栏推荐
- Hematemesis! Alibaba Android Development Manual! (Internet disk link attached)
- 2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
- 用科技赋能教育创新与重构 华为将教育信息化落到实处
- On the confirmation of original data assets
- Flink从入门到真香(7、Sink数据输出-文件)
- Ali tear off the e-commerce label
- GopherChina 2020大会
- On the software of express delivery cabinet and deposit cabinet under Windows
- This year's salary is 35W +! Why is the salary of Internet companies getting higher and higher?
- This paper analyzes the top ten Internet of things applications in 2020!
猜你喜欢
小米、OPPO在欧洲市场继续飙涨,小米更是直逼苹果
刚刚好,才是最理想的状态
wanxin finance
这次,快手终于比抖音'快'了!
Station B STM32 video learning
小青台正式踏上不归路的第3天
The progress bar written in Python is so wonderful~
OR Talk NO.19 | Facebook田渊栋博士:基于蒙特卡洛树搜索的隐动作集黑盒优化 - 知乎
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
适合c/c++新手学习的一些项目,别给我错过了!
随机推荐
Flink from introduction to Zhenxiang (7. Sink data output file)
nat转换的ip跟端口ip不相同的解决方法
DeepMind 最新论文解读:首次提出离散概率树中的因果推理算法
Rabbitmq (1) - basic introduction
Welcome to offer, grade P7, face-to-face sharing, 10000 words long text to take you through the interview process
Windows下快递投递柜、寄存柜的软件初探
Shell uses. Net objects to send mail
wanxin finance
This year's salary is 35W +! Why is the salary of Internet companies getting higher and higher?
华为云重大变革:Cloud&AI 升至华为第四大 BG ,火力全开
2035 we will build such a country
这次,快手终于比抖音'快'了!
Golang system ping program to detect the surviving host (any permission)
适合c/c++新手学习的一些项目,别给我错过了!
Millet and oppo continue to soar in the European market, and Xiaomi is even closer to apple
Golang 系统ping程序探测存活主机(任意权限)
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
Blockchain weekly: the development of digital currency is written into the 14th five year plan; Biden invited senior adviser of MIT digital currency program to join the presidential transition team; V
当Kubernetes遇到机密计算,看阿里巴巴如何保护容器内数据的安全!(附网盘链接)
On the confirmation of original data assets