c语言
健脑消识片
这个作者很懒,什么都没留下…
展开
-
整形数组中查找只出现一次的数
#include<stdio.h>#include<stdlib.h>#define N 5int main(){int sum[N],i,j,count;printf("请输入:");for(i = 0;i<N;i++)scanf("%d",&sum[i]);for(i = 0;i<N;i++){ printf("%d\t"原创 2018-12-11 13:24:49 · 229 阅读 · 0 评论 -
判断一年中的日子为第几天
#include <stdio.h>#include<stdlib.h>#include <windows.h>void main(){int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};int *p = month;//int total[12];int sum; //累加int r[1...原创 2018-12-11 15:56:11 · 362 阅读 · 0 评论 -
自主实现strcpy,strncpy,strcat,strlen函数的功能
#include<stdio.h>#include <windows.h>#define N 10void main(){char choice = ‘1’;void mystrcpy(char str_1[],char str_2[]);void mystrncpy(char str1[],char str2[]);void mystrcat(char s...原创 2018-12-09 17:26:38 · 346 阅读 · 0 评论 -
学生成绩管理
#include <stdio.h>#include <windows.h>#define N 10#define M 4int main(){int score[N][M];char choice = '1';void input(int[][M], int, int);void aver_stu(int[][M], int, int);void av...原创 2018-11-27 23:24:37 · 365 阅读 · 0 评论 -
打印菱形
#include <stdio.h>#include <stdlib.h>int main(){int i,j;int n; //输入行printf(“请输入:”);scanf("%d",&n);for(i = 0;i<=n;i++){ for(j = 0;j<n-i;j++) printf(" "); ...原创 2018-11-26 23:23:48 · 144 阅读 · 0 评论 -
累加,减,乘,除和 加 乘 乘 形式
#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){char a[100];int b[100];int i;int sum ;printf("请输入:");gets(a);for(i = 0;a[i] != '\0';i = i + 2){ b[i...原创 2018-11-22 22:10:55 · 209 阅读 · 0 评论 -
二进制转任意进制
#include <stdio.h>#include <Windows.h>#include <stdio.h>int main(){char a[100];int b[100];int c = 0,s = 0,d = 0;int n, i;int m[100];printf(“请输入二进制:”);gets (a);printf("请输入...原创 2018-11-22 22:09:28 · 311 阅读 · 0 评论 -
乘法倒置输出
#include <stdio.h>#include <stdlib.h>int main(){int n,m,ji;printf(“请输入:”);scanf("%d %d",&n,&m);ji = n * m;printf(“输出:%d%d”,ji%10,ji/10%10);return 0;}...原创 2018-11-22 22:08:00 · 249 阅读 · 0 评论 -
二进制转换任意进制
#include <stdio.h>#include <Windows.h>#include <stdio.h>int main(){char a[100];int b[100];int c = 0,s = 0,d = 0;int n, i;int m[100];printf(“请输入二进制:”);gets (a);printf("请输入...原创 2018-11-16 23:31:58 · 877 阅读 · 0 评论 -
n+nn+nnn+...+n...=n...
#include <stdio.h>int main(){int input;int i = 0,j;int num;int result = 0;int n; printf("请输入:"); scanf("%d",&n);for(j = 1;j<=n;j++){input = j;num = input;for(i = 0; i < ...原创 2018-12-11 20:53:11 · 5590 阅读 · 0 评论