int main()
{
int days;
printf("enter days you are late");
scanf("%d",days);
if (days<=5)
printf("5o paisa fine");
if (days<=10&&days>=6)
printf("1rs fine");
if(days>10)
printf("10 rs fine");
if(days=30)
printf("membership cancelled");
return 0;
}
tell me whats wrong in this program? is it right?
Answers were Sorted based on User's Feedback
Answer / hajera
1. & is missing in scanf and
2. if(days=30) one more equal is missing
instead of if(days == 30)
printf("membership cancelled")
| Is This Answer Correct ? | 2 Yes | 0 No |
can we implement multi-threads in c.
Is it possible to initialize a variable at the time it was declared?
what is difference between c and c++
There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side? Upload a C program to demonstrate the behaviour of the game.
Explain how can I pad a string to a known length?
Fifty minutes ago if it was four times as many mints past 3 o clock. how many minutes is it to six o'clock n how....?????
Is null always defined as 0(zero)?
wht is the difference between KPO and BPO ?
2 Answers Accenture, BPO, HCK, HCL, Infosys,
How to calculate sum
What is a program flowchart and explain how does it help in writing a program?
What is the c value paradox and how is it explained?
the format specified for hexa decimal is a.%d b.%o c.%x d.%u