#include <stdio.h> int main() { printf(" 0\n"); printf("<H>\n"); printf("I I\n"); return 0; }
#include <stdio.h> int main() { float a, b, c; scanf("%f%f%f", &a, &b, &c); if((a+b)>c) printf("能构成三角形\n"); else printf("不能构成三角形\n"); return 0; }
#include<stdio.h> int main() { double x, y; char c1, c2, c3; int a1, a2, a3; scanf("%d%d%d", &a1, &a2, &a3); printf("a1 = %d, a2 = %d, a3 = %d\n", a1,a2,a3); scanf("%c%c%c", &c1, &c2, &c3); printf("c1 = %c, c2 = %c, c3 = %c\n", c1, c2, c3); scanf("%lf%lf", &x, &y); printf("x = %lf, y = %lf\n",x, y); return 0; }
#include <stdio.h> int main() { int year; double year1=1000000000.0/365.0/24.0/3600.0; double year2=year1; while(year2>=1){ year2--; } if(year2>=0.5){ year=int(year1)+1; } else{ year=int(year1); } printf("10亿秒约等于%d年\n", year); return 0; }
#include <stdio.h> #include <math.h> int main() { double x, ans; while(scanf("%lf", &x) != EOF) { ans = pow(x, 365); printf("%.2f的365次方: %.2f\n", x, ans); } return 0; }
#include <stdio.h> int main() { double x, ans; while(scanf("%lf", &x) != EOF){ ans=x*9.0/5.0+32; printf("ÉãÊ϶Èc=%.2f",x); printf("£¬"); printf("»ªÊ϶Èf=%.2f\n",ans); } return 0; }
#include <stdio.h> #include <math.h> int main() { double a, b, c, s, area; while(scanf("%lf", &a) != EOF&&scanf("%lf", &b) != EOF&&scanf("%lf", &c) != EOF){ s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("a = %d,b = %d,c= %d,",int(a),int(b),int(c)); printf("area = %.3f\n",area); } return 0; }
标签:lf,return,int,scanf,实验,printf,include From: https://www.cnblogs.com/yukinoshita-/p/17739964.html