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 / sandeep

Guys '&' is missing in the scanf statement

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is malloc return c?

593


What does emoji p mean?

589


Is it fine to write void main () or main () in c?

537


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

627


Where define directive used?

596






2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2511


the question is that what you have been doing all these periods (one year gap)

1611


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

4896


What are the different types of linkage exist in c?

603


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1652


please send me the code for multiplying sparse matrix using c

1712


What is the difference between printf and scanf in c?

739


What’s the special use of UNIONS?

650


How does selection sort work in c?

611


Can you please explain the difference between strcpy() and memcpy() function?

593