最新回答 / 慕少9104305
https://www.oschina.net/search?i ... 1%32%2E%38%63%62%6Ahttps://www.oschina.net/search?i ... 0%B1%32%2E%38%6C%6Fhttps://www.oschina.net/search?i ... 1%32%2E%38%78%76%65https://www.oschina.net/search?i ... 0%B1%32%2E%38%78%68https://www.oschina.net/search?...
2022-01-13
#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
最新回答 / 慕少9104305
https://www.chunyuyisheng.com/pc ... 1%32%2E%38%67%69%72https://www.chunyuyisheng.com/pc ... 1%32%2E%38%77%79%63https://www.chunyuyisheng.com/pc ... 0%B1%32%2E%38%70%75https://www.chunyuyisheng.com/pc ... 0%B1%32%2E%38%77%70https://www.chunyuyisheng.com/p...
2022-01-09
if(sale<100){
printf("很遗憾,期望你再接再厉");
return 0;
}
if(sale >100 && year >=2){
printf("恭喜你获得优秀员工");
return 0;
}
printf("很遗憾,期望你再接再厉");
printf("很遗憾,期望你再接再厉");
return 0;
}
if(sale >100 && year >=2){
printf("恭喜你获得优秀员工");
return 0;
}
printf("很遗憾,期望你再接再厉");
2022-01-07
#include <stdio.h>
int main()
{
int age; age = 15;
int height;height = 162;
float weight;weight = 82.5;
char isfat;isfat = 'y';
int main()
{
int age; age = 15;
int height;height = 162;
float weight;weight = 82.5;
char isfat;isfat = 'y';
2022-01-06
#include <stdio.h>
int main()
{
char c = 'a';
int n = 97; //将c赋值给n
float f =97.000000; //将c赋值给f
double d =97.000000; //将c赋值给d
n=c;
f=n;
d=f;
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
int main()
{
char c = 'a';
int n = 97; //将c赋值给n
float f =97.000000; //将c赋值给f
double d =97.000000; //将c赋值给d
n=c;
f=n;
d=f;
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
2022-01-05
最赞回答 / 小白菜慢慢长大
长方形如下:#include <stdio.h>int main(){ int i, j, k; for(i=1; i<6; i++) { for(j=i;j>6;j++) { printf(" "); } for(k=1;k<=5;k++) { printf("*"); } printf("...
2022-01-04
简化写法:
#include <stdio.h>
int main()
{
int arr[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
int i,j;
int sum=0;
for(i=0;i<3;i++)
{
sum+=arr[i][i];
if (i != 2 - i){
sum+=arr[2 - i][i];
}
}
printf("对角线元素之和是:%d\n",sum);
return 0;
}
#include <stdio.h>
int main()
{
int arr[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
int i,j;
int sum=0;
for(i=0;i<3;i++)
{
sum+=arr[i][i];
if (i != 2 - i){
sum+=arr[2 - i][i];
}
}
printf("对角线元素之和是:%d\n",sum);
return 0;
}
2022-01-04
最新回答 / 慕姐7416298
http://physics.scu.edu.cn/search ... 1%32%2E%38%75%67%75http://physics.scu.edu.cn/search ... 1%32%2E%38%67%61%70http://physics.scu.edu.cn/search ... 0%B1%32%2E%38%76%6Fhttp://physics.scu.edu.cn/search ... 0%B1%32%2E%38%75%6Dhttp://physics.scu.edu.cn/searc...
2022-01-04
#include <stdio.h>
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>=100&&year>=2)
{
printf("%s\n","哟呵666");
}
else
{
printf("%s\n","很遗憾,期望你再接再厉");
}
return 0;
}
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>=100&&year>=2)
{
printf("%s\n","哟呵666");
}
else
{
printf("%s\n","很遗憾,期望你再接再厉");
}
return 0;
}
2022-01-04