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 |
Why Modern OS are interrupt driven?Give an example
What is the difference between scanf and fscanf?
Explain how can I remove the trailing spaces from a string?
What is conio h in c?
Why c is called procedure oriented language?
program to convert a integer to string in c language'
The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);
1 Answers HCL, Public Service Commission,
What are the modifiers available in c programming language?
What is the concatenation operator?
What are c header files?
in a town the percentage of men is 52 the percentage of total literacy is 48 if total percentage of literate men is 35 of the total population write a program to find the total no of the literate men and women if the population of the town is 80000
What is the use of f in c?