What's wrong with the following program?
(Copy it and paste it to C++ program to see it)
Hint: Is there any interface
between user and programmer? Does the program take user's information?
What is it for if the program
only displays information?
#include<iostream>
#include<iomanip>
using namespace std;
void main ()
{
int Hundred, Fifty, Twenty, Ten, Five, One;
cout<< "Enter number of one dollar bills(-1 to quit): 769 ";
cout<<endl<<endl;
cout<< "769 dollar bills will be change to" <<endl;
Hundred= 7;
Fifty= 1;
Twenty= 0;
Ten= 1;
Five= 1;
One= 4;
cout<<endl<<endl;
cout<< setw(10)<< "Hundred"<< setw(10)<< "Fifty"<< setw(10)<< "Twenty"<< setw(10)<< "Ten"<< setw(10)<< "Five"<<setw(10)<< "One" <<endl;
cout<< setw(10)<< Hundred<< setw(10)<< Fifty<< setw(10)<< Twenty<< setw(10)<< Ten<< setw(10)<< Five<< setw(10)<< One <<endl;
cout<< "Enter number of one dollar bills(-1 to quit): 396";
cout<<endl<<endl;
cout<< "396 dollar bills will be change to" <<endl;
Hundred= 3;
Fifty= 1;
Twenty= 2;
Ten= 0;
Five= 1;
One= 1;
cout<<endl<<endl;
cout<< setw(10)<< "Hundred"<< setw(10)<< "Fifty"<< setw(10)<< "Twenty"<< setw(10)<< "Ten"<< setw(10)<< "Five"<<setw(10)<< "One" <<endl;
cout<< setw(10)<< Hundred<< setw(10)<< Fifty<< setw(10)<< Twenty<< setw(10)<< Ten<< setw(10)<< Five<< setw(10)<< One <<endl;
cout<< "Enter number of one dollar bills(-1 to quit): 542";
cout<<endl<<endl;
cout<< "542 dollar bills will be change to" <<endl;
Hundred= 5;
Fifty= 0;
Twenty= 2;
Ten= 0;
Five= 0;
One= 2;
cout<<endl<<endl;
cout<< setw(10)<< "Hundred"<< setw(10)<< "Fifty"<< setw(10)<< "Twenty"<< setw(10)<< "Ten"<< setw(10)<< "Five"<<setw(10)<< "One" <<endl;
cout<< setw(10)<< Hundred<< setw(10)<< Fifty<< setw(10)<< Twenty<< setw(10)<< Ten<< setw(10)<< Five<< setw(10)<< One <<endl;
cout<< "Enter number of one dollar bills(-1 to quit): -1 "<<endl<<endl;
}