66问答网
所有问题
当前搜索:
c语言编程题经典题目
c语言
,
编程题
答:
include <stdio.h>main(){int a[3][4],t,i,j,k;printf("
程序
功能:输入一个3*4阶矩阵,输出其中元素的最大值。\n\n");printf("请输入矩阵元素:\n");for(i=0;i<3;i++)for(j=0;j<4;j++)scanf("%d",&a[i][j]);for(i=0;i<3;i++)for(j=0;j<4;j++)if(a[i][...
C语言编程题
求解
答:
按照题意,表格使用结构链表实现。其中成员班级或工龄,使用自定义的联合体union(就是
题目
要求的共用体)。函数异常不做处理,直接抛出,你需要可以在调用时判断处理异常。include <stdio.h> include <malloc.h> typedef union info4 { char cName[10];//班级名称 int wAge;//工龄 }IO4;typedef ...
求解
C语言编程题目
答:
include<iostream> using namespace std;typedef struct node{ char data[4]; //成绩 node *next;}ListNode,*Linklist;LinkList createLinklist(){ // 输入学生成绩 char flag='1';ListNode *node;Linklist head=(ListNode *)malloc(sizeof(ListNode));ListNode *p=head;while(flag=='1...
C语言
:下面描述的
题目
咋
编程
?
答:
代码文本:include "stdio.h"char repeat(char *p,char n){//重复检查 char i;for(i=0;i<n;i++)if(p[n]==p[i])return 0;return 1;} char check(char *p){//检查输入是否正确 char i,n;for(n=0;p[n];n++);if(n==8){ for(i=1;i<n;i++)//检查 if(!repeat(p,i))...
C语言编程题目
答:
include "stdio.h"void main(){ double RS=13.0756,r=1.01;int nian=2005;while(RS<=15){ RS=RS*r;nian++;} printf("%d年中国的人口超过十五亿。\n",nian);}
简单的
C语言编程题目
求解!
答:
define MAX_ARRAY 10 include <stdio.h> void main(){ int Num_p;//评委人数 int score;//评分 int a[MAX_ARRAY];int Max_Scor;//最高分 int Min_Scor;//最低分 int All_Scor=0;//总分 printf("评委人数:");scanf("%d\n",&Num_p);for(int i=0;i<=Num_p-1;i++){ scanf...
c语言程序编程题目
视频时间 1:49
C语言
的
编程题
答:
float Cprogram; /*
C语言
成绩*/ float sports; /*体育成绩*/ float total;/*总分*/ float average;/*平均分*/ } Student;Student stu[STU_NUM];/*输入学生信息*/ void input(){ int i;printf("请输入%d个学生的信息:\n",STU_NUM);for(i=1;i<=STU_NUM;i++){ printf("第%d个...
一个
c语言题目
写
程序
答:
include<stdio.h> define N 10 int main(){ int i,n,num;int a[N];int *p,*q,*end;printf("输入十个数\n");for(i=0;i<N;i++){ scanf("%d",&a[i]);} printf("输入要删除的数\n");scanf("%d",&num);n=N;end=a+N-1;p=q=a;while(q<end){ if(*p==num){ while...
C语言编程题目
求助
答:
这里考虑你所学内容,尽可能用最基本的知识写,没有使用指针,结构,链表等内容。只用了基本知识和循环结构。其中strcpy函数只是字符串复制函数,如果没用过也可以自己写循环实现字符串复制。(以后如果考虑多组数据的存储,建议数据定义结构体,可以用malloc动态申请内存,字符串交换初始化可以使用string.h下...
棣栭〉
<涓婁竴椤
6
7
8
9
11
12
13
14
10
15
涓嬩竴椤
灏鹃〉
其他人还搜