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
What will be the output
+3
votes
asked
Mar 22, 2020
by
Vidhura Rathnayake
(
150
points)
#include <stdio.h>
int main(void)
{
int sum = 15;
if ( sum > 20 )
}
else
{
sum = sum + 20;
}
print("value = %d \n" , sum);
return 0;
}
urgent
output
please-help
needhelp
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.
4 Answers
+2
votes
answered
Mar 22, 2020
by
Dev Ganesh
(
180
points)
The code is incorrect
after if variable unwanted flower base is added
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
Mar 26, 2020
by
GURINDER SINGH
(
140
points)
I think you want to write this program
int main()
{ int sum = 15;
if (sum > 20);
else
sum = sum + 20;
Printed("value = %d\n",sum);
return 0;
}
You didn't specify what you need in if statement and no need to add braces after if else statements.
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
Mar 31, 2020
by
Sanath Sanath
(
140
points)
answer is 35
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
Apr 6, 2020
by
1916114
(
260
points)
syntax error because if doesnt have a opening brace
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.
...