Что можно улучшить в программе? C++
<a rel="nofollow" href="http://pastebin.com/WyWGtxTS" target="_blank">http://pastebin.com/WyWGtxTS</a>
<a rel="nofollow" href="http://pastebin.com/WyWGtxTS" target="_blank">http://pastebin.com/WyWGtxTS</a>
#include <iostream>
using namespace std;
struct adv {
adv(int _a, float _p, float _c) : adsshown(_a), percclicked(_p), clickearned(_c), khz(_a * _p * _c) { }
void show() {
cout << adsshown << " ads shown" << endl
<< percclicked << " percent of clickage" << endl
<< clickearned << " earned for click" << endl
<< khz << " you made for day" << endl;
}
int adsshown;
float percclicked;
float clickearned;
float khz;
};
int main() {
cout << "Enter how many ads shown: ";
int adsshown;
cin >> adsshown;
cout << "Enter percent of clicked (from 0 to 1): ";
float percclicked;
cin >> percclicked;
cout << "Enter how many you earned for an each click: ";
float clickearned;
cin >> clickearned;
adv site(adsshown, percclicked, clickearned);
site.show();
cin.get(); cin.get();
return 0;
}
Собственно, ничего больше и не надо.