main(){int a,b,ca=12;b=45;c=a*bprintf("c=%d\n",c);}这里面的%d\n是什么意思?
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 06:57:34
main(){inta,b,ca=12;b=45;c=a*bprintf("c=%d\n",c);}这里面的%d\n是什么意思?main(){inta,b,ca=12;b=45;c=a*bprintf
main(){int a,b,ca=12;b=45;c=a*bprintf("c=%d\n",c);}这里面的%d\n是什么意思?
main()
{
int a,b,c
a=12;b=45;
c=a*b
printf("c=%d\n",c);
}
这里面的%d\n是什么意思?
main(){int a,b,ca=12;b=45;c=a*bprintf("c=%d\n",c);}这里面的%d\n是什么意思?
%d表示你要打印的这个变量c是个整数,\n表示换行.
希望及时选择优秀答案并给好评.
先订正这个程序的错误,正确的写法如下:
main()
{
int a,b,c;
a=12;
b=45;
c=a*b;
printf("c=%d\n",c);/*"%d"表示“以十进制整数形式输出”*/
}
main(){int a,b,ca=12;b=45;c=a*bprintf(c=%d
,c);}这里面的%d
是什么意思?
#include int a=3,b=5; max (int a,int b) {int c; c=a>b?a:b; return (c); } void main() {int
#include using namespace std; int main() { int a,b,c; a=3; int f(int x,int y,int z);#include using namespace std; int main() {int a,b,c;a=3;int f(int x,int y,int z); cin>>a>>b>>c;c=f(a,b,c);cout
#include int main() { int a,b,c; scanf(%d,%d,&a,&b); printf(c=a+b
,a,b); }
C++有道题看不懂,#include int func(int a,int b);int main(){cout
#include int b=2; int fun(int *k) {b=*k+b;return(b);} main() {int a[10]={1,2,3,4,5,6,7,8},
swap(int *p1,int *p2) {int temp; temp=*p1; *p1=*p2; *p2=temp; } main() { int a,b; int *pointer_1,*pswap(int *p1,int *p2){int temp;temp=*p1;*p1=*p2;*p2=temp;}main(){ int a,b;int *pointer_1,*pointer_2;scanf(%d,%d,&a,&b);pointer_1=&a;pointer_2=&b;if(a
.main() { int a=1,b=10; do {b-=a;a++;}while(b--
z=x>y? x : y;什么意思啊13#include int max(int x, int y);main(){ int a,b,ca=7;b=8;c=max(a,b);printf(Max is %d,c);}max(int x, int y){ int z;z=x>y? x : y;return(z) ;}运行结果为:Max is 8这里面有个z=x>y? x : y;不懂,高手解答下.
#include using namespace std; class blah{ public:static int a; int b; blah(int x) { b=class blah{ public:static int a; int b; blah(int x) { b=x; a=b+1; } };int blah::a = 0; void main(void) { blah b1(5); blah b2(12); cout
error C2065:'a' :undeclared identifier#includeint main(){int print_shang();int print_xia();print_shang();print_xia();return 0;}int print_shang(){int a,b;for(a=1;a
main() { int a,b,c; a=1;b=2;c=3; if(a
main() {int a,b; for (a=1,b=1;a
swap交换函数,用指针实现.#include stdafx.hvoid swap(int &a,int &b ){int* p=&a;int* q=&b; int* t ;if(*p>*q){ t=p;p=q;q=t;}//a=*p;//b=*q;}int main(){int a=12;int b= 1;printf(a=%d
b = %d
,a,b);swap(a,b);printf(a=%d
b = %d
,a,b);re
int fm(int a,int b) {if(b==1)return a; else return a+fm(a,b-1); } main( ) { printf(%d
,fm(4,3))
int fm(int a,int b) {if(b==1)return a; else return a+fm(a,b-1); } main( ) { printf(%d
,fm(4,3)
main() {int a=666,b=888; printf(%d
,a,b) }为什么结果是666
overloaded function as left operand#include int Max(int a,int b,int c){int max;if(a>b)if(a>c)max=a; elsemax=c;elseif(b>c)max=b;elsemax=c;}void main(){int max(int a,int b,int c);int a,b,c; printf(Input a number:); scanf(%d,&a); printf(Input secon