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


Please Help Members By Posting Answers For Below Questions

write a program to concatenation the string using switch case?

1560


Explain what are run-time errors?

610


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?

1918


What are multidimensional arrays?

656


Where local variables are stored in c?

556






What is scanf_s in c?

633


What are the types of unary operators?

662


what is different between auto and local static? why should we use local static?

644


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?

2173


How can I get back to the interactive keyboard if stdin is redirected?

670


What is #include cctype?

580


What is structure and union in c?

602


What is the difference between class and object in c?

583


What is the purpose of 'register' keyword in c language?

629


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

747