Skip to content

Instantly share code, notes, and snippets.

@Simpall1337

Simpall1337/Laba 1

Created Nov 21, 2020
Embed
What would you like to do?
/Лабораторна робота No1 (С).Програми лінійної структури.
//Завдання 3
// Виконав : Гузо Олександр
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Ukrainian");
int x1,y1, x2, y2, x3, y3, y4, x4,x5,y5,x6,y6, result1,result2;
cout << "Введiть кiлькiсть мяса" << "\n";
cin >> x1;
cout << "\n";
cout << "Введiть кiлькiсть риби" << "\n";
cin >> x2;
cout << "\n";
cout << "Введiть кiлькiсть картоплi" << "\n";
cin >> x3;
cout << "\n";
cout << "Введiть кiлькiсть манго" << "\n";
cin >> x4;
cout << "\n";
cout << "Введiть кiлькiсть кiвi" << "\n";
cin >> x5;
cout << "\n";
cout << "Введiть кiлькiсть буряку" << "\n";
cin >> x6;
cout << "\n";
result1 = x1 + x2 + x3 + x4 + x5 + x6;
cout << "\n" << x1 << "+" << x2 << "+" << x3 << "+" << x4 << "+" << x5 << "+" << x6 <<"=" << result1 << "кг"<< "\n" ;
cout << "Введiть цiну мяса" << "\n";
cin >> y1;
cout << "\n";
cout << "Введiть цiну риби" << "\n";
cin >> y2;
cout << "\n";
cout << "Введiть цiну картоплi" << "\n";
cin >> y3;
cout << "\n";
cout << "Введiть цiну манго" << "\n";
cin >> y4;
cout << "\n";
cout << "Введiть цiну кiвi" << "\n";
cin >> y5;
cout << "\n";
cout << "Введiть цiну буряку" << "\n";
cin >> y6;
cout << "\n";
result2 = y1 + y2 + y3 + y4 + y5 + y6;
cout << "\n" << y1 << "+" << y2 << "+" << y3 << "+" << y4 << "+" << y5 << "+" << y6 << "=" << result2 << "грн" << "\n";
cout << "Вага всього товару " << result1 <<"кг "<<"i "<< "Цiна всього товару " << result2 <<"грн ";
cin.get();
return 0;
}
@Simpall1337

This comment has been minimized.

Copy link
Owner Author

@Simpall1337 Simpall1337 commented Nov 21, 2020

My first work in c++ :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment