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?
Answer Posted / 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 |
Post New Answer View All Answers
What is nested structure with example?
How are 16- and 32-bit numbers stored?
What is meant by recursion?
What is realloc in c?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What is exit() function?
What is function prototype in c language?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
How can I find the modification date of a file?
How can I avoid the abort, retry, fail messages?
What is the purpose of type declarations?
What is the use of gets and puts?
How to declare a variable?
By using C language input a date into it and if it is right?
What is an endless loop?