摘要:
1 #include <stdio.h> 2 int main () 3 { 4 double salary ; //工资 5 double total_salary = 0; 6 double adv_salary; 7 int i ; 8 for(i = 0;i < 6;i++) 9 { 10 阅读全文
posted @ 2021-07-28 12:07
Bytezero!
阅读(116)
评论(0)
推荐(0)
摘要:
1 //输入一个数字,找出整数相加都等于输入的数字 2 3 4 #include <stdio.h> 5 int main() 6 { 7 int num ; 8 int i ; 9 printf("请输入一个数字: "); //6 10 scanf("%d",&num); 11 12 for( i 阅读全文
posted @ 2021-07-28 12:04
Bytezero!
阅读(90)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 int price = 150; 6 int guess ; 7 int i = 0; 8 9 10 for(;i<5 ;i++) 11 { 12 13 printf("请输入 阅读全文
posted @ 2021-07-28 12:02
Bytezero!
阅读(213)
评论(0)
推荐(0)
摘要:
#include<stdio.h> int main() { int i =1; int sum = 0; for(i = 0; i <101; i++) { if( i % 2 == 0) { sum += i; } } printf("%d\n",sum); } 阅读全文
posted @ 2021-07-28 12:00
Bytezero!
阅读(520)
评论(0)
推荐(0)
摘要:
C 语言支持数组数据结构,它可以存储一个固定大小的相同类型元素的顺序集合。数组是用来存储一系列数据,但它往往被认为是一系列相同类型的变量。 数组的声明并不是声明一个个单独的变量,比如 runoob0、runoob1、...、runoob99,而是声明一个数组变量,比如 runoob,然后使用 run 阅读全文
posted @ 2021-07-28 11:57
Bytezero!
阅读(111)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 int main() 3 { 4 int nums[] = {8,4,2,1,23,344,12}; 5 int i; 6 int sum = 0; 7 double avg; 8 9 int searchNum; 10 11 //打印 数组里的元素 1 阅读全文
posted @ 2021-07-28 11:55
Bytezero!
阅读(82)
评论(0)
推荐(0)
摘要:
1 //动态录入 2 3 #include <stdio.h> 4 # define N 5 5 int main() 6 { 7 8 double score[5]; //数组5 个元素 9 int i; // 循环变量 10 for(i = 0; i < N; i++) 11 { 12 prin 阅读全文
posted @ 2021-07-28 11:54
Bytezero!
阅读(86)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #define N 7 3 4 int main() 5 { 6 7 int nums [N] = {10,85,96,5,9,6,200}; //定义了一个数组,里面有 7 个元素 8 int i ,j; 9 int temp; 10 11 //外层循 阅读全文
posted @ 2021-07-28 11:50
Bytezero!
阅读(523)
评论(0)
推荐(0)
摘要:
1 //数组 查询 增加 删除 排序 2 3 #include <stdio.h> 4 int main() 5 { 6 7 double power[] = {100,855,600,8960,20}; //定义一个战斗力的数组 8 int count = 5; //元素个数为5 9 10 dou 阅读全文
posted @ 2021-07-28 11:49
Bytezero!
阅读(58)
评论(0)
推荐(0)
摘要:
1 #include<stdio.h> 2 int main() 3 { 4 //使用二维数组 进行的打印 5 double scores[4][3] = {{87,56,89},{98,55,46},{98,65,56},{98,65,23}}; 6 int i,j; 7 for(i = 0; i 阅读全文
posted @ 2021-07-28 11:45
Bytezero!
阅读(37)
评论(0)
推荐(0)
浙公网安备 33010602011771号