Advertisement
rado_dimitrov66

Untitled

Nov 7th, 2023
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6.     string ModelandMarka, ModelandMarka2, ModelandMarka3;
  7.     int Price, Price2, Price3;
  8.     int Color, Color2, Color3;
  9.     int Inches, Inches2, Inches3;
  10.  
  11.     cout << "Type the manufacturer and model of the first laptop - For example: HP - Acer Predator: ";
  12.     cin >> ModelandMarka;
  13.  
  14.     cout << "Type price of the first laptop: ";
  15.     cin >> Price;
  16.  
  17.     cout << "Type color of the first laptop: ";
  18.     cin >> Color;
  19.  
  20.     cout << "Type inches of the first laptop: ";
  21.     cin >> Inches;
  22.  
  23.     cout << "Type the manufacturer and model of the second laptop: ";
  24.     cin >> ModelandMarka2;
  25.  
  26.     cout << "Type price of the second laptop: ";
  27.     cin >> Price2;
  28.  
  29.     cout << "Type color of the second laptop: ";
  30.     cin >> Color2;
  31.  
  32.     cout << "Type inches of the second laptop: ";
  33.     cin >> Inches2;
  34.  
  35.     cout << "Type the manufacturer and model of the third laptop: ";
  36.     cin >> ModelandMarka3;
  37.  
  38.     cout << "Type price of the third laptop:";
  39.     cin >> Price3;
  40.  
  41.     cout << "Type color of the third laptop: ";
  42.     cin >> Color3;
  43.  
  44.     cout << "Type inches of the third laptop: ";
  45.     cin >> Inches3;
  46.  
  47.     cout << "" << endl;
  48.     cout << "-----------------------------------------------------------------------------------------------------------------------" << endl;
  49.     cout << setw(5) << setiosflags(ios::left) << "|" << setw(25) << "ManAndModel" << setw(2) << "|" << setw(25) << "Price" << "|" << setw(25) << "Color" << setw(2) << "|" << setw(25) << "Inches" << setw(2) << "|" << endl;
  50.     cout << "-------------------------------------------------------------------------------------------------------------------------" << endl;
  51.     cout << setiosflags(ios::left) << "| " << setw(25) << ModelandMarka << "| " << setw(25) << Price << "| " << setw(25) << Color << "| " << setw(25) << Inches << "| " << endl;
  52.     cout << "--------------------------------------------------------------------------------------------------------------------------" << endl;
  53.     cout << setiosflags(ios::left) << "| " << setw(25) << ModelandMarka2 << "| " << setw(25) << Price2 << "| " << setw(25) << Color2 << "| " << setw(25) << Inches2 << "| " << endl;
  54.     cout << "--------------------------------------------------------------------------------------------------------------------------" << endl;
  55.     cout << setiosflags(ios::left) << "| " << setw(25) << ModelandMarka3 << "| " << setw(25) << Price3 << "| " << setw(25) << Color3 << "| " << setw(25) << Inches3 << "| " << endl;
  56.     cout << "--------------------------------------------------------------------------------------------------------------------------" << endl;
  57.     return 0;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement