I am trying to write a airline reserve system like program, I have to write a program to assign seats on each flights (10 max for each flight)
u ask the user to type either 1 or 2, 1 for 1st class...
Type: Posts; User: strider496
I am trying to write a airline reserve system like program, I have to write a program to assign seats on each flights (10 max for each flight)
u ask the user to type either 1 or 2, 1 for 1st class...
thx guys got my programs to run
revised
#include <stdio.h>
int gcd(int a, int b);
int main()
{
heres the revised code
#include <stdio.h>
long gcd (int,int);
I'm new to C programming
I'll try to write the program, but I don't even know what the program is asking me to write
The greatest common divisor of integers x and y is the largest integer that...
thx for the helps guys i got it to run correctly
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
int main()
{
int guess=-1;
int num = 0;
thx guys
if i want to revise my program so when the player guess the number in less than 10 tries i want to print out "you're good", do i just add
if (i=1;i <10;++i)
{
printf("you're good\n");
}
...
my revised code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
i fixed the syntax now it runs but infinite numbers and too high,try again scrolls down
when i input 6 as seed
:cool:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
my result was this
enter car number
1
enter hours parked
1.5
enter car number
2
enter hours parked
4.0
#include <stdio.h>
int main()
{
int car,counter=0;
float minfee=2.00,maxfee=10.00,hours,totcharge,tothours,
calculateCharge;
totcharge=0;
tothours=0;
This is the program
A parking garage charges $2 for minimum fee to park up to 3 hours and then a $.50 per hour charge after the 3rd hour. The maximum charge for any 24 hour parking is $10. ...
I need to write a program that input the miles driven and gallons used . The program should calculate and display the miles per gallon. After processing all input information, the program should...