爱C语言
菜鸟零零七
这个作者很懒,什么都没留下…
展开
-
怎么样才能学好c语言?
刚刚接触到自己的专业,感觉特别难 什么也看不懂 在过去的一个月来 渐渐的有点看懂了,而且还对自己的专业有了一点爱好 能够听懂老师在讲什么 而且 还会自己编一点自己的程序 我会在接下来的学习当中渐渐地学会C语言 喜欢C语言 主动学习C语言 使我在接下来的大学四年有一原创 2012-10-20 14:57:52 · 691 阅读 · 1 评论 -
重载双目预算符
#include using namespace std; class String {public: String(){p=NULL;} String(char * str); void display(); private: char *p; }; String::String(char * str) {p=str;} void String::display()翻译 2013-04-24 17:00:50 · 860 阅读 · 0 评论 -
分数的累加
#include using namespace std; int main() { double j=2,s=0,m=1; while(1) { s=s+(j-1)/(j+1)*m; m=m*-1; j=j+2; if(j==22)break; } cout"1/3-3/5+5/7转载 2013-03-21 22:46:12 · 737 阅读 · 0 评论 -
求本月有几天
#include using namespace std; int main() { int year,month,day; cout cin>>year>>month ; swich(maoth) { cace 1: cace 3: cace 5: cace 7:原创 2013-03-20 08:22:45 · 581 阅读 · 0 评论 -
是什么原因???
#include using namespace std; int main() { int a,b>>,sum; cin>>a>>b; sum=a+b; cout retun0; } fatal error C1083: Cannot open include file: 'iostream': No such原创 2013-03-03 13:08:52 · 535 阅读 · 1 评论 -
为什么总是出下面同样的错误??求解
#include using namespace std; int max(int x,int y) { int z; if(x>y)z=x; else z=y; return(z); } int main() { int a,b,m; cin>>a>>b; m=max(a,b); cout return0; } fat原创 2013-03-03 13:04:48 · 362 阅读 · 0 评论 -
c
#include void main() { int score; printf("please input 5 grade score: "); scanf("%d",&score); switch(score) { case 5: printf("very good! "); case 4: printf("good. "); case翻译 2012-11-08 09:18:49 · 631 阅读 · 0 评论 -
c
#include "stdio.h" void main() { int x,i,j,k; scanf("%d",&x); if(x { i=x/10; j=-10*i; printf("%d%d\n",j,i); } else { i=x/100; j=x/10%10; k=x%10; printf("%d%d%d",翻译 2012-11-08 08:48:37 · 533 阅读 · 0 评论 -
C
#include void main() { int a,b; printf("please input A,B: "); scanf("%d,%d",&a,&b); if(a!=b) if(a>b) printf("A>B\n"); else printf("A else printf("A=B\n"); }翻译 2012-11-08 08:29:24 · 530 阅读 · 2 评论 -
运算符重载
#include using namespace std; class Complex { public: Complex(){real=0;imag=0} Complex(double r,double i){real=r;imag=i;} friend Complex operator+(Complex &c1,Complex &c2); void display(); pr翻译 2013-04-24 17:05:06 · 898 阅读 · 0 评论