- 博客(6)
- 问答 (1)
- 收藏
- 关注
原创 c++整理
1.#includeusing namespace std;这里可以替换这样写#include2:关于申请空间Student::Student(char *name1, char *stu_no1, float score1){ name = new char[strlen(name1) + 1]; strcpy(name, name1);stu_no = new char
2015-06-04 22:22:34 411
原创 人民币的拆分
#include "stdio.h"void main(){ int x; printf("enter x:"); scanf("%d",&x); fun(x); }int fun(int x){ int i; if(x>=100) { printf("%d",100); return fun(x-100); } if(x>=50) { printf(
2014-12-18 22:27:45 567
原创 数组的应用
对于我这个初学者,我觉得学习c语言必不可少的品质就是要细心。比如#include#includevoid main(){char a[50],b[50],c[100]; int i=0,j=0,k=0;gets(a);gets(b);for(i=0;a[i]!='\0';i++) { c[k]=a[i]; k++; } for(j=0;b[j]!='\0';j
2014-12-08 22:31:31 446
原创 粗心的数组
定义一个函数,他的功能是计算n个学生的成绩中高于平均成绩的人数,并作为函数值。用主函数来调用它。#include "stdio.h"int fun(float score[],int n){ float sum=0; int i,j,k=0; float average; for(i=0;i { sum+=i; } average=sum/n;
2014-11-30 10:40:26 717
空空如也
求帮助,为什么点了运算或者清除没反应呢
2015-11-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人