77问答网
所有问题
当前搜索:
编写一个C语言程序
怎样
编写
最简单的
c语言程序
答:
最简单的可执行
程序
应该是:main(){ printf("Hello!");} 这也是
C语言
中最经典的示例。
求帮忙
编一个c语言程序
答:
本来想着给你答一下。结果发现太迟了,只是
编写
了一些代码。你看一下。如果能用就用。还没编译过。一定有很多问题吧。(一般) 。只是参考一下。或可这么做。include <stdio.h>#define MAXSIZE 1024int store[MAXSIZE];/* sort */int sort_target(int* dest,const int* s,size_t n){ ...
c语言
如何
编写
下面的
程序
答:
/* 格式化输出.
c
*/#include <stdio.h> include int main(int argc, char *argv[]){ printf ( "/*
C
program*/\n" );printf ( "\"How are you\"\n" );printf ( "\\2013-3-13\\\n" );return 0;}
求怎样用
C语言编写
下面
程序
,在线等,急!
答:
j ++)printf("0 ");for(j = 0; j < 11 - 2*i -
1
; j ++)printf("8 ");printf("\n");}}第二题的 include <stdio.h>int main(){int r = 0;int a = 9;int
c
= 1;int i;for(i = 0; i < 5; i ++){r += a*c;a--;c*=10;}printf("%d\n", r);} ...
用
c语言编写
的代码
程序
答:
c语言
的
源程序
语法结构如下:include<stdio.h>//预处理语句 /* 自定义函数
1
*/ /* 自定义函数2*/ int main(){ //main()主函数执行调用以上定义的函数的顺序 return 0;//执行完毕 退出 } 示例如下:include <stdio.h> int main(){ printf("welcome to c language!!!\n");return 0;} ...
C语言编一个程序
答:
void swap(int *array, int n){ try { int t = array[0]; array[0] = array[n-
1
]; array[n-1] = t; } catch (...) { throw "error"; }}
C语言编写
下列
程序
?
答:
1
)int i; float n; float sum=0;float ave;for(i=0;i<10;i++){ scanf("%f",n);sum+=n;} ave=sum/10;2)int i;for(i=1;i<=100;i++){if(i*i>=150&&i*i<=200) break;} printf("%d",i*i);3)long x;int a[20];int n,i=0;scanf("%ld",x);while(x){a[i++...
C语言 程序
答:
//第一问#include <stdio.h>#define N 4typedef struct student{float ps_score; //平时成绩float sx_score; //实习成绩float cy_score; //测验成绩float qm_score; //期末成绩float zp_score; //总评成绩}STUD;void input(STUD *st,int n){int i;for(i=0;i<n;i++)scanf("...
C语言
简单
程序编写
答:
include <stdio.h>void main(){int faHeight, moHeight, height, m;printf("请选择你的性别,男性输入
1
,女性输入0:");scanf("%d", &m);printf("请输入你父亲的身高:");scanf("%d", &faHeight);printf("请输入你母亲的身高:");scanf("%d", &moHeight);if(m = 1)height = (fa...
如何用
C语言编写
以下
程序
?(要求在补充说明里)
答:
include<stdio.h> define VALUE 0.8 void main(){ float total=0;int day=1,a;scanf("%d",&a);while(total<=a){ total+=2*VALUE*day;day++;} printf("%f",total/day);}
棣栭〉
<涓婁竴椤
67
68
69
70
71
72
73
74
75
76
其他人还搜