Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
In a contest my following programme is proving wrong ,,,,But why ?
0
votes
asked
Jan 11, 2018
by
zenia
#include<stdio.h>
int main()
{
int T,AB,AC,R=1,I;
scanf("%d",&T);
printf("\n");
if(T<=100)
{
for(I=1;I<=T;I++)
{
scanf("%d%d",&AB,&AC);
if(1<=AB&&AC<=100)
{
R=((AB*AB)+(AC*AC));
printf("Case %d: %d\n",I,R);
}
}
}
return 0;
}
-help-plz
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
2 Answers
0
votes
answered
Jan 11, 2018
by
anonymous
I think you should share problem statement.
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Jan 24, 2018
by
Robayet Al Hamim
(
310
points)
if(1<=AB&&AC<=100)
there's the problem :)
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...