0

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

*/

Edited by WaltP: Added CODE tags -- with all the help about them, how could you miss using them????

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Narue
0

>need to change this from availcredit01.cpp to availseats01.cpp
>and make the necessary adjustments

Well? What have you done to accomplish this requirement, what's the problem that prompted you to post a thread, and how did you attempt to fix the problem before running to us with your tail between your legs? And did you read our rules or any of the umpteen pages describing how to use code tags?

Edited by Narue: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.