剪刀石头布源代码includestdio.hincludestdlib.hmain int d,x; printf请输入:1是剪刀,2是石头,3是布; scanfd,d; xrand3; ifdx printf双方平局; else ifd1
printf("专业课导论:%d ",stu[j].dl); printf("C语言:%d ",stu[j].cyy); printf("体育:%d ",stu[j].ty); printf("总分:%d ",stu[j].s); printf("平均:%.1lf ",stu[j].pj); printf("顺序:%d \n",j+1); } } } void chakang(struct student stu[M]) //***查看函数 *** {...
对C语言有一定的了解 方法/步骤 1 源程序:(程序结果可以运行出来)#include "stdio.h"#include "stdlib.h"#include "time.h"//计时#define ERROR 0#define OK 1#define OVERFLOW -2#define MAXSIZE 100000 //用户自己规定排序的数字的长度typedef int Status;typedef struct{ int *r; // r[0]闲置 ...
经典C语言源代码 1、(1)某年某月某日是星期几 #include<stdio.h> int main() { int year, month, day; while (scanf_s(%d%d%d, &year, &month, &day) != EOF) { if (month == 1 || month == 2)//判断month是否为1或2 { year--; month += 12; } int c = year / 100; int y ...
C语言程序源代码 #include <REGX51.H> // 51寄存器定义 #include "intrins.h" #define control P1 //P1_0:A相,P1_1:B相,P1_2:C相,P1_3:D相 #define discode P0 //显示代码控制端口 #define uchar unsigned char //定义无符号型变量 #define uint unsigned int sbit en_dm=P3^0; //显示代码...
1、include<stdio.h>include<malloc.h>include<conio.h>definemaxsize100typedefdoubledatatype1;typedefchardatatype2;typedefstructstack1datatype1data1maxsize;inttop1;/*栈顶元素*/seqstack1,*pseqstack1;/*顺序栈*/typedefstructstack2datatype2data2maxsize;inttop2;/*栈顶元素*/seqstack2,*pseqstack2;/*...
C语言源代码源文件 #include <stdio.h> #include <malloc.h> #include <string.h> #include <stdlib.h> #define NULL 0 #define LEN sizeof(struct student) struct student { char name[20]; long int num; int English[4]; int Math; int com[30]; int ave; struct student *next; };//定义...
(完整word版)C语言源代码剪刀石头布源代码 #include<stdio.h> #include<stdlib.h> main() { int d,x; { printf("请输入:1是剪刀,2是石头,3是布"); scanf("%d",&d); x=rand()%3; if(d==x) printf("双方平局"); else if((d==1&&x==2)||(d==2&&x==3)||(d==3&&x==1)) ...
经典C 语言源代码 1、(1)某年某月某日就就是星期几 #include<stdio、h> int main() { int year, month, day; while (scanf_s("%d%d%d", &year, &month, &day) != EOF) { if (month == 1 || month == 2)//判断 month 就就是否为 1或 2 { year--; month += 12; } int c = ...
经典C语言源代码 1、(1)某年某月某日是星期几 #include<> intmain() { intyear,month,day; while(scanf_s("%d%d%d",&year,&month,&day)!=EOF) { if(month==1||month==2)d.%d",&start[0],&start[1],&start[2]); printf("请输入结束日期,如:\n"); scanf_s("%d.%d.%d",&end[0],...