-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (26 loc) · 703 Bytes
/
Copy pathmain.cpp
File metadata and controls
29 lines (26 loc) · 703 Bytes
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
#include <iostream>
#include <string>
void readAndConvert()
{
int i = 0;
int limit;
std::string company;
std::string description;
// std::cout << "enter limit" <<std::endl;
std::cin>>limit;
std::cin.ignore(1);
// std::cout << "enter companyt" <<std::endl;
getline(std::cin,company);
// std::cout << "enter descitpoin" <<std::endl;
getline(std::cin,description);
int amount;
double price;
std::string st_name;
std::cout << description << " (" << company << ")" << std::endl;
while (i<limit)
{
std::cin >> amount >> price >> st_name;
i++;
std::cout << st_name << ": " << floor(amount*price) << std::endl;
}
}