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
write a program to concatenation the string using switch case?
Explain what are run-time errors?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What are multidimensional arrays?
Where local variables are stored in c?
What is scanf_s in c?
What are the types of unary operators?
what is different between auto and local static? why should we use local static?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
How can I get back to the interactive keyboard if stdin is redirected?
What is #include cctype?
What is structure and union in c?
What is the difference between class and object in c?
What is the purpose of 'register' keyword in c language?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?