Problem Y: 零起点学算法21——摄氏温度转换

#include<stdio.h>
int main()
{
    float f,c;
    while(scanf("%f",&f)!=EOF)
    c=5.0/9*(f-32);
    printf("%.3f",c);
    return 0;
}

原文地址:https://www.cnblogs.com/chenlong991223/p/9742929.html

时间: 2024-07-30 00:08:30

Problem Y: 零起点学算法21——摄氏温度转换的相关文章

1116: 零起点学算法23——摄氏温度转换

1116: 零起点学算法23--摄氏温度转换 Time Limit: 1 Sec  Memory Limit: 64 MB   64bit IO Format: %lldSubmitted: 1982  Accepted: 1305[Submit][Status][Web Board] Description 输入华氏温度f,输出对应的摄氏温度c,保留3位小数. c=5/9*(f-32) Input 输入f(多组数据) Output 输出c(每组数据一行) Sample Input 100 Sa

1114: 零起点学算法21——求平均值

1114: 零起点学算法21--求平均值 Time Limit: 1 Sec  Memory Limit: 64 MB   64bit IO Format: %lldSubmitted: 4420  Accepted: 1634[Submit][Status][Web Board] Description 输入3个浮点数,求出平均值,保留3位小数 Input 输入3个浮点数数(多组数据) Output 输出平均值,保留3位小数(每组数据一行) Sample Input 2 3 4 Sample

Problem H: 零起点学算法109——单数变复数

#include <stdio.h> #include<string.h> int main(void) { int n; char word[100]; scanf("%d",&n); getchar(); int i; while(n!=0) { gets(word); int k=strlen(word); if(word[k-1]=='y') strcat(word,"es"); else if(word[k-2]=='s'|

Problem O: 零起点学算法10——求圆柱体的表面积

#include<stdio.h> int main() { float r,h,pi; pi=3.1415926; scanf("%f %f",&r,&h); printf("Area=""%.3f",2*pi*r*r+2*pi*r*h); return 0; } 原文地址:https://www.cnblogs.com/chenlong991223/p/9720035.html

Problem U: 零起点学算法19——输出特殊值

#include<stdio.h> int main() { printf("%%d"); return 0; } 原文地址:https://www.cnblogs.com/chenlong991223/p/9720422.html

Problem V: 零起点学算法20——输出特殊值II

#include<stdio.h> int main() { printf("\\n"); return 0; } 原文地址:https://www.cnblogs.com/chenlong991223/p/9720428.html

Problem S: 零起点学算法14——三位数反转

#include<stdio.h> #include<stdlib.h> int main() { int a,b,c,s; scanf("%d",&s); a=s/100; b=s%100/10; c=s%100%10; printf("%d%d%d",c,b,a); system("pause"); return 0; } 原文地址:https://www.cnblogs.com/chenlong991223/

Problem T: 零起点学算法15——交换变量

#include<stdio.h> int main() { int a,b,c; scanf("%d %d",&a,&b); c=a; a=b; b=c; printf("%d %d",a,b); return 0; } 原文地址:https://www.cnblogs.com/chenlong991223/p/9720399.html

Problem Z: 零起点学算法22——求正弦和余弦

#include<stdio.h> #include <math.h> int main() { int n; const double pi=acos(-1); double a,b; while(scanf("%d",&n)!=EOF) a=sin(n*pi/180); b=cos(n*pi/180); printf("%.2f\n%.2f\n",a,b); return 0; } 原文地址:https://www.cnblogs