C语言比较两数大小

来源:互联网 发布:mac版永恒战士2存档 编辑:程序博客网 时间:2024/05/04 01:01
#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) {int shu1,shu2;printf("请输入比较大小的两个数:");scanf("%d%d",&shu1,&shu2);if(shu1<shu2){shu1+=shu2;shu2=shu1-shu2;shu1=shu1-shu2; }   printf("%d>%d",shu1,shu2);return 0;}

原创粉丝点击