You need to use the % before any output, it 'tells' the program that it's a data-type that your going to be outputting instead of the actual character
2006-08-11 01:37:36
·
answer #1
·
answered by rachelle105210 5
·
0⤊
0⤋
rachelle105210 is absoultely right .... How does this work ? ... Simply ... compiler prints the string btn commas " " ... when it finds % operator , it searches for the variables after commas , in ur case (a) ... It also checks if the type of this variable is the same tupe after % operator ... so if u wrote %d , a must be integer while if u wrote %s the variable must be string ... and so on .......
As a pesonal advice , use cout istead of printf and cin instead of scanf ... I'll write an example for u ...
printf("my age is %d and my name is %s",a,b);
// while a is an integer and b is a string , by using cout it will be ..
cout<<"my age is"<
so u don't need to use % operator.
scanf("%d%d",&a,&b) ----> cin>>a>>b;
2006-08-11 08:49:49
·
answer #2
·
answered by ferikiko87 1
·
0⤊
0⤋
Your question is kinda blurry.
But I'm assuming the answer is: the % operator is universal the type is specified by the d character in your case, depending on your language. I also am assuming it's c/c++
You can find a list on what letter goes to what type in the compiler help.
2006-08-11 08:34:42
·
answer #3
·
answered by Dragosh 3
·
0⤊
0⤋
You might want to consult your computing books for that. I would think it would return a zero value or error message since you haven't defined a, b and d as variables ?
2006-08-11 08:35:57
·
answer #4
·
answered by michael2003c2003 5
·
0⤊
0⤋
Huh?
2006-08-11 08:33:03
·
answer #5
·
answered by alter_tygo 5
·
0⤊
0⤋
And your question is?
2006-08-11 08:33:08
·
answer #6
·
answered by Dan K 3
·
0⤊
0⤋
No, you're gay.
2006-08-11 08:33:10
·
answer #7
·
answered by Game Guy 5
·
0⤊
2⤋