kbys.net
当前位置:首页 >> 求简单C语言程序代码! >>

求简单C语言程序代码!

#include int fun(int num1, int num2);void main(){int num1, num2;int sum;printf("请输入两个整数:\n");scanf("%d %d", &num1, &num2);if(num1 > num2){int tmp = num1;num1 = num2;num2 = tmp;}sum = fun(num1, num2);printf("大于等于%d小...

#include int main{} 这是可以编译的最小程序,虽然没什么用

这几题都简单:新手就这样做 1: #include void main() {printf("%d,%o,%x",0,0,0); printf("%d,%o,%x",9,9,9); printf("%d,%o,%x",A,A,A); printf("%d,%o,%x",Z,Z,Z); } 2: #include void main() {int a,b,t; scanf("%d,%d",&a,&b); t=a;a=b;b...

#include #include #define True 1#define False 0int search(int *arr,int n,int value){ int i; for(i=0;i

#include #define GREAT_THAN(a, b) ((a) > (b))#define LESS_THAN(a, b) ((a) < (b))#define GREAT_OR_EQUAL(a, b) ((a) >= (b))#define LESS_OR_EQUAL(a, b) ((a)

黑白棋游戏 #include "graphics.h" /*图形系统头文件*/ #define LEFT 0x4b00 /*光标左键值*/ #define RIGHT 0x4d00 /*光标右键值*/ #define DOWN 0x5000 /*光标下键值*/ #define UP 0x4800 /*光标上键值*/ #define ESC 0x011b /* ESC键值*/ #def...

#include main() { int a,b,c; printf("请输入两个整数:"); scanf("%d%d",&a,&b); c=a+b; printf("这两个数的和是:\n%d+%d=%d",a,b,c); } #include void main() { int a,b,sum; a=123;b=456; sum=a+b; printf("sum is %d\n",sum); } 完成

#include "stdio.h"int main(int argv,char *argc[]){char x[20]="你好";printf("请输入汉字姓名:");scanf("%s",x+4);printf("\n%s\n\n",x);return 0;}运行样例:

例一://按"1"、"2"控制 #include"stdio.h" #include"conio.h" void delay(int x) { int y; while(x--) for(y=0;y

#include #include #include #define LEN sizeof(struct record) /*对结构体长度进行宏定义*/ void menu();/*声明菜单函数*/ struct record*insert(struct record *head);/*声明添加函数 */ struct record*delet(struct record *head); /*声明删...

网站首页 | 网站地图
All rights reserved Powered by www.kbys.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com