Electrical and Computer Engineering
35 of 37
UAH
CPE 112
Interactive Input/Output
•//******************************************************************
•// Prompts program
•// This program demonstrates the use of input prompts
•//******************************************************************
•#include <iostream>
•#include <iomanip>    // For setprecision()
• 
•using namespace std;
• 
•int main()
•{
•    int   partNumber;
•    int   quantity;
•    float unitPrice;
•    float totalPrice;
• 
•    cout << fixed << showpoint            // Set up floating-pt.
•         << setprecision(2);              //   output format
• 
•