Problem B: 零起点学算法17——2个数比较大小

#include<stdio.h>
int main()
{
    int n,m;
    while(scanf("%d %d",&n,&m)!=EOF)
    if(n<m)
    printf("%d %d",m,n);
    else
    printf("%d %d",n,m);
    return 0;
} 

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

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

Problem B: 零起点学算法17——2个数比较大小的相关文章

Problem C: 零起点学算法18——3个数比较大小

#include<stdio.h> int main() { int a,b,c; while(scanf("%d %d %d",&a,&b,&c)!=EOF) if(a<b){ int flag=a; a=b; b=flag; } if(a<c){ int flag=a; a=c; c=flag; } if(b<c){ int flag=b; b=c; c=flag; } printf("%d %d %d",a

1110: 零起点学算法17——比较2个数大小

1110: 零起点学算法17--比较2个数大小 Time Limit: 1 Sec  Memory Limit: 64 MB   64bit IO Format: %lldSubmitted: 3272  Accepted: 1639[Submit][Status][Web Board] Description 输入2个整数,按照从大到小输出 Input 2个整数n和m(多组测试数据) Output 按照从大到小输出,中间用空格隔开(每组测试数据一行) Sample Input 14 32 2

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

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