|
|
back to boardRe: Ruzmamat Posted by Amina 26 May 2012 01:39 What is wrong???? #include <math.h> #include <stdio.h> int main(){ int larry, herry,sum; scanf ("%i %i", &larry, &herry); sum=larry+herry; if (sum==11){ printf ("%i %i", herry-1, larry-1); } else printf ("wrong"); return 0; } Re: Ruzmamat Because your output only supports the example given in the problem statement. If the sum is NOT 11, your program will fail. Eliminate the "if", and use your first printf. |
|
|