个人中心
我的提问
我的回答
今日任务
我的设置
退出
文档资料
电脑网络
体育运动
医疗健康
游戏
社会民生
文化艺术
电子数码
娱乐休闲
商业理财
教育科学
生活
烦恼
资源共享
其它
歪果仁看中国
爱问日报
精选问答
爱问教育
爱问公益
爱问法律
计算公元后的相差天数 #include long sum(int y,int m,int d) { int x[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; long i,s=0; for(i=1;i 软件 1个回答
1个回答
int y=m; Int age; cout>y>>m; if(m>7)y++; age=2012-y; if(age<0)cout<<"wrong time!"< C C/C++ 1个回答
#include int main() { float a=0.0,b=0.0; printf("Please input two number:\n"); scanf("%f,%f",&a,&b); if(a>b){ printf("%f,%f",a,b); } else{ printf("%f...
2个回答
main() { int i,a[10]; clrscr(); for(i=0;i<10;i++) { scanf("%d",&a[i]); if(a[0]>a[i]) a[0]=a[i]; } printf("%d",a[0]); getch(); }
#include void main() { int a,b,c,max,min,mid; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(a>b)max=a; else max=b; if(maxc)min=c; if(a!=max&&a!=...
#include #include #include void main() { int i,j; gotoxy(10,8); printf("please input the first number:"); gotoxy(10,10); printf("please input the seco...
比较简单的做法 #include "stdio.h" void main() { int num1,num2; printf("请输入两个正整数:\n"); scanf("%d%d",&num1,&num2); while(num1 != num2)//当两数不等时,不停的用大数减小数,并把结果赋值...
贴代码吧···看了代码才知道什么问题··
直接输入小写字母就不用判断是不是小写的了,所以程序如下 main() {char s[100],*p=s; scanf("%s",s); while(*s!='\0') 当S等于\0时结束 { *s=*s-32; 输入的字符是小写与大写字符相差32,所以转时就要-32 s++; 地址加1 } pr...
3个回答
LZ要说清楚双竖杠的用途~~如果只是“或”的操作~就可以直接输入,如果是想显示出来~~就用转译字符···/||
严格的水仙花是三位数,并且其每位数的三次方的和等于它的本身。例子如下:370是一个严格的水仙花数,3^3+7^3+0^3=370.2、C语言的"水仙花数
#include main() { char c; int s=0,n; printf("请输入整数:"); while((c=getchar())!='\n')//判断,当遇到回车键时结束程序。 { if(c>='0'&&c<='9') { n++; s=s+(c-48);//因为‘0’的ASCL...
/*从键盘输入3个任意整数,输出其中的最大数*/ #include main() { int i,max,d; scanf("%d",&d); max=d; for(i=2;imax) max=d; } printf("%d",max); }
char temp; scanf("%c",temp); if((temp>=61)&&(temp<=86)) temp = temp+36; else if((temp>=97)&&(temp<=122)) temp = ...
#include void chang(int *a,int *b) { int temp; temp=*a; *a=*b; *b=temp; } int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a C/C++ 1个回答
楼上的没搞错吧;这是的C语言;不是用C++s=1+3+5+…+97+99 :int s=0;for(int i=1; i<100; i+=2)s += i;printf("s=1+3+5+…+97+99 = %d",s);s=1+3+5+…+97+99 :int s=0;for(int i=1...
4个回答
程序已经通过了。 #include void main() { int n = 1, i = 1, j; while (i <= 5) { j = 1; while (j <= i) { printf("%d ", n); n++; j++; } printf("\n"); i++; } }