1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#include <iostream>
#include <string>
using namespace std;
void convertmoney(int money, int &nbrhundreds, int &nbrfifties, int &nbrtwenties, int &nbrtens, int &nbrfives, int &nbrones);
int main ()
{
const int arraysize = 20;
string firstname[arraysize];
string lastname[arraysize];
string phonenumber[arraysize];
string email[arraysize];
int moneyamount = 0, hundreds = 0, fifties = 0,twenties = 0, tens = 0, fives = 0, ones = 0;
for (int i = 0; i < 20; i++)
{
cout << "What is your first name?" << endl;
cin >> firstname[i];
cout << "What is your last name?" << endl;
cin >> lastname[i];
cout << "Email address?" << endl;
cin >> email[i];
cout << "Phone number?" << endl;
cin >> phonenumber[i];
cout << "Money that needs to be converted?" << endl;
cin >> moneyamount;
void convertmoney(moneyamount, hundreds, fifties, twenties, tens, fives, ones);
cout << "Hello " << firstname[i] << " " << lastname[i] << "," << endl;
cout << "Email: " << email[i] << endl;
cout << hundreds << endl;
}
return 1;
}
void convertmoney(int money, int &nbrhundreds, int &nbrfifties, int &nbrtwenties, int &nbrtens, int &nbrfives, int &nbrones)
{
nbrhundreds = money%100;
}
|