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 |
the operator for exponencation is a.** b.^ c.% d.not available
program that accepts amount in figures and print that in words
2 Answers Infosys, Lovely Professional University, Wipro,
What is the difference between malloc() and calloc() function in c language?
write an algorithm and c program to add two 2x2 matrics
Explain what standard functions are available to manipulate strings?
being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
What is the basic structure of c?
Define circular linked list.
Can a file other than a .h file be included with #include?
What is the difference between printf and scanf in c?
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }