码迷,mamicode.com
首页 >  
搜索关键字:visaul stdio    ( 10042个结果
exp+6
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 4 typedef struct student { int id; char name[20]; char subject[20]; float perf; floa ...
分类:其他好文   时间:2020-12-28 11:16:34    阅读次数:0
实验六
1.实验任务1 // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 / ...
分类:其他好文   时间:2020-12-28 11:15:35    阅读次数:0
结构体
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 5 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name[20] ...
分类:其他好文   时间:2020-12-28 11:14:32    阅读次数:0
Scalar evolution技术与i^n求和优化
Scalar evolution技术与i^n求和优化 (如果不想看一开始的引例,想直接看Scalar evolution,可以直接跳过这个“引例”部分。) 引例 考虑$i^3$求和 \[ S=\sum_{i=1}^n{i^3} \] 其C语言代码为 #include <stdio.h> int ma ...
分类:其他好文   时间:2020-12-28 10:54:45    阅读次数:0
选择法与冒泡法
#include <stdio.h> #include <stdlib.h> //选择法 int main(){ int a[10]={1,2,5,98,25,3,6,7,0,8}; int i,j,k,temp; for(i=0;i<9;i++){ k=i; for(j=i+1;j<10;j++) ...
分类:其他好文   时间:2020-12-25 12:06:59    阅读次数:0
实验6
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef struct student { int id; char name[20]; char subject[20]; / float perf; fl ...
分类:其他好文   时间:2020-12-25 11:55:05    阅读次数:0
c_流程控制_循环
while循环,其语法格式如下。 while(表达式){ 循环体; } 复合表达式的使用可以节约代码的行数,使代码看起来更加的整洁和简单。 #include <stdio.h>#include <stdlib.h>int main(){ FILE *fp = NULL; fp = fopen("./ ...
分类:其他好文   时间:2020-12-25 11:35:32    阅读次数:0
实验五
任务一 #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", & ...
分类:其他好文   时间:2020-12-22 13:10:47    阅读次数:0
3n+1猜想
#include<stdio.h>intmain(){intn;/输入的正整数n/intstep=0;/计算步数/scanf("%d",&n);/*输入正整数n*/for(step=0;n>1;step++){if(n%2==0)/*如果n是偶数,则除以2*/n=n/2;else/*如果n是奇数,则用3n+1除以2*/n=(3*n+1)/2;}/*结束for循环*/pri
分类:其他好文   时间:2020-12-22 13:07:07    阅读次数:0
例子2
#include<stdio.h>/当fahr=0,20,……,300时,分别打印华氏温度与摄氏温度对照表/intmain(){printf("摄氏温度-华氏温度对照表\n");intfahr;for(fahr=300;fahr>=0;fahr=fahr-20){printf("%3d%6.1f\n",fahr,(5.0/9.0)(fahr
分类:其他好文   时间:2020-12-22 11:43:41    阅读次数:0
10042条   上一页 1 ... 26 27 28 29 30 ... 1005 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!