I am trying to make a program in C which will ask the user their preferred suite and additional services and later on calculate their cost of stay. However my program exits with a warning and does not let the user enter an input suite.
I have included the code below. It is incomplete and I still have to write the method will calculate the cost. My only concern is that why is my program not taking user input?
'''
#include <stdio.h>
#include <stdlib.h>
void main()
{
printf("Welcome to La Quinta Palm Springs\n");
printf("Below mentioned are the various suites available here\n");
printf("_________________________________________________________________________________\n");
printf("Gold Suite\n");
printf("Cost per night: 7000 Rs.\n");
printf("Inclusions: Breakfast, wifi, Airport Transportation\n");
printf("Cost for aditional services:\n");
printf("Laundry: 400 Rs per day\n");
printf("Lunch 1500 Per Person\n");
printf("Brunch 700 Per Person ");
printf("Dinner 2000 Per Person ");
printf("Silver Suite\n");
printf("Cost per night: 5000 Rs.\n");
printf("Inclusions: Breakfast, wifi, Airport Transportation\n");
printf("Cost for aditional services:\n");
printf("Laundry: 400 Rs per day\n");
printf("Lunch 1300 Per Person\n");
printf("Brunch 500 Per Person \n");
printf("Dinner 1500 Per Person \n");
char suite[9], laundry[3];
int nperson,nnights,nrooms,nPerRoom;
printf("Enter your preferred suite: ");
scanf('%s',suite);
printf("For how many nights do you plan to stay? :");
scanf('%d',&nnights);
printf("Please enter the number of persons staying in one room: ");
}
'''