#include <stdio.h>
int main()
{
int number=200;
int year=2014;
do{
year++;
number=number*1.2;
}while(number<1000);
printf("到%d年招工规模突破1000人\n", year);
return 0;
}
int main()
{
int number=200;
int year=2014;
do{
year++;
number=number*1.2;
}while(number<1000);
printf("到%d年招工规模突破1000人\n", year);
return 0;
}
2022-01-29
#include <stdio.h>
int main()
{
// 定义相乘数字i,j以及结果result
int i, j, result;
for(i=9;i>0;i--)
{
for(j=1;j<=i;j++)
{
result = i*j;
printf("%d*%d=%d ",i,j,result);
}
printf("\n");
return 0;
}
int main()
{
// 定义相乘数字i,j以及结果result
int i, j, result;
for(i=9;i>0;i--)
{
for(j=1;j<=i;j++)
{
result = i*j;
printf("%d*%d=%d ",i,j,result);
}
printf("\n");
return 0;
}
2022-01-29
#include <stdio.h>
int main()
{
int year = 2014; //今年是2014年
//补全一下代码
if(year%4 == 0)
{
if(year%100!=0)
{
printf("今年是闰年");
}
else
{
printf("今年是平年");
}
}
else
{
printf("今年是平年");
}
int main()
{
int year = 2014; //今年是2014年
//补全一下代码
if(year%4 == 0)
{
if(year%100!=0)
{
printf("今年是闰年");
}
else
{
printf("今年是平年");
}
}
else
{
printf("今年是平年");
}
2022-01-28
#include <stdio.h>
int main(){
int age = 18;
float height = 1.85;
char unit = 'm';
printf("小明今年%d岁\n", age);
printf("小明身高%f%c\n", height, unit);
printf("小明现在在慕课网上学习IT技术");
return 0;
}
int main(){
int age = 18;
float height = 1.85;
char unit = 'm';
printf("小明今年%d岁\n", age);
printf("小明身高%f%c\n", height, unit);
printf("小明现在在慕课网上学习IT技术");
return 0;
}
2022-01-23
return 15.6+(m-3)*2.3;
}
}
int main()
{
int num;
num=Time(9,12);
printf("小明每天打车的总费用为%d元",num+num);
return 0;
}
}
}
int main()
{
int num;
num=Time(9,12);
printf("小明每天打车的总费用为%d元",num+num);
return 0;
}
#include <stdio.h>
int Time(int n,int m)
{
if(0<n<5||23<n<24&&m<=3)
{
return 15.6;
}
else if(5<=n<=23&&m<=3)
{
return 13;
}
else if(0<n<5||23<n<24&&m>3)
{
return 15.6+(m-3)*1.2*2.3;
}
else if(5<=n<=23&&m>3)
{
int Time(int n,int m)
{
if(0<n<5||23<n<24&&m<=3)
{
return 15.6;
}
else if(5<=n<=23&&m<=3)
{
return 13;
}
else if(0<n<5||23<n<24&&m>3)
{
return 15.6+(m-3)*1.2*2.3;
}
else if(5<=n<=23&&m>3)
{
#include <stdio.h>
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>=100&&year>=2)
{
printf("%s\n","获得优秀员工奖");
}
else
{
printf("%s\n"," 很遗憾,期望你再接再厉");
}
return 0;
}
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>=100&&year>=2)
{
printf("%s\n","获得优秀员工奖");
}
else
{
printf("%s\n"," 很遗憾,期望你再接再厉");
}
return 0;
}
2022-01-17
#include <stdio.h>
int main()
{
int year = 2014; //今年是2014年
if((year%4==0&&year%100!=0)||year%400==0)
{
printf("%s\n","今年是闰年");
}
else
{
printf("%s\n","今年是平年");
}
return 0;
}
int main()
{
int year = 2014; //今年是2014年
if((year%4==0&&year%100!=0)||year%400==0)
{
printf("%s\n","今年是闰年");
}
else
{
printf("%s\n","今年是平年");
}
return 0;
}
2022-01-13
#include <stdio.h>
int main()
{
double num1 = 2.5;
int num = (int)num1; //定义浮点型变量num并赋值为2.5
printf("num的整数部分是%d\n", num);
return 0;
}
int main()
{
double num1 = 2.5;
int num = (int)num1; //定义浮点型变量num并赋值为2.5
printf("num的整数部分是%d\n", num);
return 0;
}
2022-01-13
#include <stdio.h>
int main()
{
int number=200;
int year=2014;
while ( number<1000 )
{
number=number*1.2;
year++;
}
printf("到%d年招工规模突破1000人\n",year);
return 0;
}
int main()
{
int number=200;
int year=2014;
while ( number<1000 )
{
number=number*1.2;
year++;
}
printf("到%d年招工规模突破1000人\n",year);
return 0;
}
2022-01-12