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 oops means?
Explain what is the heap?
What is a structure and why it is used?
develop algorithms to add polynomials (i) in one variable
What are the 4 data types?
Which is an example of a structural homology?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is declaration and definition in c?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
What is function pointer c?
write a program to print largest number of each row of a 2D array
What are types of structure?
Explain indirection?
Can a variable be both constant and volatile?
What is the use of clrscr?