Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is nested structure with example?

1057


How are 16- and 32-bit numbers stored?

1279


What is meant by recursion?

1034


What is realloc in c?

1065


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1141


What is exit() function?

1001


What is function prototype in c language?

1019


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3231


How can I find the modification date of a file?

1264


How can I avoid the abort, retry, fail messages?

1122


What is the purpose of type declarations?

1105


What is the use of gets and puts?

1011


How to declare a variable?

992


By using C language input a date into it and if it is right?

1062


What is an endless loop?

1260