55问答网
所有问题
当前搜索:
c语言编程题长得
求
C语言编程
很长的程序100多行的
答:
C语言
写的21点
程序
!include <stdio.h> include <stdlib.h> include define NULL 0 int compare(char sum1,char sum2){ if(sum1>=sum2)return 1;else return 0;} int breakal(int sum){ if(sum>21)return 0;else return 1;} char change(int card){ char ch,n,m,x;switch(card...
c语言编程题
:写一个函数,求一个字符串的长度。
答:
include "stdio.h"int getLength(char *p){ int length=0;for(;*p!='\0';p++)length++;return length;} int main(){ char a[80]={0};printf("请输入一个字符串:");gets(a);printf("输入字符串的长度为:%d\n",getLength(a));return 0;} ...
用
C语言
写出一道关于随机数的
编程题
答:
include "stdio.h"include "string.h"include "stdlib.h"include "time.h"define NUMLEN 69 define BigNum char void bigNumCpy(BigNum a, const BigNum b)//大数间复制 { memcpy(a, b, NUMLEN);} int add(const BigNum a, const BigNum b, BigNum c)//大数加法 { int i;int t1 = 0...
C语言
结构体
编程题
求大神啊!
答:
include <stdio.h> include <stdlib.h> include <string.h> //数据手工录入比较合理,这里为了方便,直接写在
程序
里了 struct student { char *no;int grade1;int grade2;double grade;};define TOTAL_STUDENT 8 int cn[TOTAL_STUDENT] = {1,2,3,4,5,6,7,8};int ps[TOTAL_STUDENT] = ...
计算机三级数据库
C语言编程题
答:
完整正确
程序
:include <stdio.h> include <stdlib.h> FILE *fin, *fout;char xx[100][11];int n = 100;int yy[10];void ReadDat();void CountRs();void main(void){ char namein[]="in.dat",nameout[]="out.dat";int i;fin = fopen(namein,"r");(void) ReadDat();fclose(...
高手请进!一道
C语言编程
的题,对于您这相当简单!急!!
答:
m\n都是十六进制数 0xabc相对应的十进制数为2748 (oxabc是十六进制数,0123是八进制数;)m-=n;相当于m=m-n;(-=称为自反赋值运算)m=2748-2748 所以m=0 最后,printf("%X\n",m);意即将m按%X\n(%X\n表示按十六进制输出,并换行,0的对应十六进制即0),所以屏幕输出0 换行 ...
C语言编程
小问题
答:
temper[
c
--] = (tempernumber + t) % 10;t = (int)((tempernumber + t) / 10);} if (t > 0){ temper[c] = t;temper[0] = 2 * MAX - 2 - c + 1; //temper[0]记录所得的积最高位的确切位置,//此时为有进位的情况 } else temper[0] = 2 * MAX -2 - c;} ...
C语言编程
,这是个模拟题
答:
include "stdio.h"int fun(long n,long a[]){int x,y,z,i=0;while(a[i++]=n,n!=123){for(x=y=z=0;n;n%10&1 ? y++ : x++,z++,n/=10);n = x ? x*100+y*10+z : y*100+x*10+z;}return i;}int main(int argv,char *argc[]){long n,a[10],i;FILE *fp...
C语言编程
实现题 谢谢了
答:
int a,n,A=1,Sn=0;scanf(%d%d",&a,&n);for(i=0;i<n;i++){A*=a;Sn+=A;} 楼下说的没错,的确存在溢出问题,当时是用手机写的,只能写120字。| 指数型数字增长太快,楼主可以自己选择判断:int型,long型,long long 型(范围是long的平方)。完整
程序
如下:include"conio.h" /...
c语言编程题
答:
2011年小学期
C语言程序设计
训练实习报告程序源代码 (实验一)1-1:/*输入一串字符,以“?”结束,统计各字母出现的次数,并按字母出现的多少输出(先输出字母出现多的,次数相同的按照字母表顺序输出,不出现的不输出)*/ include <stdio.h> include<string.h> include<stdlib.h> define N 100 vo...
<涓婁竴椤
1
2
3
4
5
6
7
8
9
10
涓嬩竴椤
灏鹃〉
其他人还搜