C++ newb program

need to change this from availcredit01.cpp to availseats01.cpp and make the necessary adjustments
1)ask user to enter the room size
2)get room size
3)ask user to enter number of students
4)get enrolled
5)set avilseats to room size minus enrolled
6)display the available sets
7)halt and return to operating system
i'm a newb so any help would be greatly appreciated
#include <iostream> // systems-supplied hdrs
#include <cstdio> // scanf and printf
using namespace std; // avoid std::cin ...

int main (void) // main returns an int
{
/* main local space */
double balance; // input variables
double creditLimit; //

double availCredit; // output variable

/* begin procedural code */
cout << "Enter balance: "; // prompt user
cin >> balance; // get data
cout << "Enter credit limit: "; // prompt user
cin >> creditLimit; // get data

/* processs input */
availCredit = creditLimit - balance; // expression

/* display output */
printf("\nAvailable Credit: %.2f\n\n", availCredit);

/* halt and return to operating system */
return(0); // pass int back to o/s
}

/*

Enter balance: 500.00 <- Soft-copy Output
Enter credit limit: 3500.00

Available credit: 3000.00 <- Note rounded result

*/
Feel free to show the work you have done so far, what is it your having trouble with perhaps we can help?
Please don't ask for people to do your homework for you, it's unfair to people helping and it's unfair to your other classmates.
Topic archived. No new replies allowed.