编程高手请进!(C语言)
1.include <stdio.h> include<stdlib.h> include<ctype.h> main(){ int count;\/*猜数字的次数*\/ int number;\/*系统产生的随机数字*\/ int guess;\/*程序员输入数字*\/ char yes='Y';clrscr();printf("\\nNow let us play the game.\\n Guess the number:");while (toupper(yes)=='Y'...
关于C语言编程的 啊,高手进来吧
1.include<stdio.h> void main(){ int a[20]={2,4,6,8,10,12,14,16,18,20},n,count=0,i=0,in=0;while(a[count]!=0){ printf("\\n%d",a[count]);count++;} printf("\\nPlease input a integer which you want to insert:");scanf("%d",&n);while(a[in]<n){ in++;...
C语言编程问题.请高手进(附源码)!!!HELP
printf("\\n请输入拼音码(菜名首字母)&编码&价格{回车确定}\\n");scanf("%s%d%f",c,&d,&e);printf("此款菜:类别为%d,编码为%d,拼音吗为%s,菜名为%s,价格为%f\\n是否正确?(正确请输入1,否则按任意键退出):",b,d,c,A,e);scanf("%d",&f);\/\/---&f if (f==1)fprintf(g,"此款...
用C语言写一段程序,高手快来哦!
include <stdio.h> define RANGE 15 int get_min_id(int * x, int range){ int i = 0, j = 0, m = 99999999L;for(i = 0; i < range; i++) { if (x[i] < m) { m = x[i];j = i;} } return j;} void sort(int x[RANGE]){ int i = 0, j = 0, r = 0...
C语言编程 TC2.0 高手进..200分数学计算程序
main(){ int a,b;int c[] = {1,2,3,4,5,6,7,8,9,10};int i,sum;scanf("%d%d", &a,&b);printf("%d*%d=%d",a,b,a*b);scanf("%d", &a);printf("%d is %s",a,a&1?"odd":"even");for(i=0;i<10;i++)sum+=c[i];printf("average is:%f",(float)sum\/10)...
c语言高手进。 帮我编程下 。 小弟感激不尽~
int main(void){ int yearB=0, monthB=0, dayB=0;int yearE=0, monthE=0, dayE=0;int difYear, difMonth;\/\/ 输入日期1 printf("Input the beginning date(yyyy.mm.dd)\\n");scanf("%d.%d.%d", &yearB, &monthB, &dayB);\/\/ printf( "%d.%d.%d\\n", yearB, monthB, day...
C语言高手进!我是菜鸟请教
include<stdio.h> void main(){ int a,b,c;for(a=0;a<=20;a++)for(b=0;b<=33;b++)for(c=0;c<=300;c=c+3){if(5*a+3*b+c\/3==100&&a+b+c==100)printf("公鸡%d个母鸡%d个小鸡%d个\\n",a,b,c);} }
高分C语言问题~~·高手请进
int getValue(int A[]){ 初始 int S=0 1. (数组A)n个数字从小到大排序 (例如:1,2,9)2. 取上步中最小的两个数相加之和为一个M , S=S+M 3. 数组A中除去最小的两个数,然后将M加进去形成一个新数组A元素个数为 n=n-1 4. n>1时回到1.否则函数返回S+A[0] (或S+M,因为...
c语言高手进来
char* f(char *s){ int i=0;while(s[i]!='\\0'){ if(s[i]>=48 && s[i]<=57) \/\/48 57分别为0和9的ASCII码 当这个数在0到9之间 说明是数字 s[i]=s[i+1]; \/\/那么就把后面那个赋值上来 删除作用 i++; \/\/继续分析下一个数字 } return s;\/\/对这个字符串作分析处理了后 ...
C语言高手请进!!!
改后的程序:include "stdio.h"include "stdlib.h"include "time.h"void main(){ int n,i,j,squ[10][10];srand((unsigned)time(0));for(i=0;i<10;i++){ for(j=0;j<10;j++){ \/\/产生随机数,&&&这部分我帮你改了&&& n=rand()%1000;squ[i][j] = n;\/\/显示部分 if(squ...