Вы находитесь на странице: 1из 5

Лаборатнорна робота

1) #include <iostream>
using namespace std;
int main()
{
float x, y, c ;

cout << "x = ";


cin >> x;

cout << "y = ";


cin >> y;

c = x * y;

cout << "c = " << c;

#include <iostream>
using namespace std;
int main()
{
float x, y, c ;

cout << "x = ";


cin >> x;

cout << "y = ";


cin >> y;

c = x / y;

cout << "c = " << c;

2) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "ru");
int a, b, c;
int average;

cout << "Введите 3 числа " << endl;

cin >> a >> b >> c;

average = (a + b + c) / 3;

cout << "Среднее арифметичесоке = " << average << endl;

3) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int m;

cout << "Введите расстояние в метрах: ";


cin >> m;

cout << "Расстояние в сантиметрах: ";

cout << m * 100 << endl;

return 0;

4) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int centner;

cout << "Введите масу в центнерах: ";


cin >> centner;

cout << "Маса в килограмах: ";

cout << centner * 100 << endl;

return 0;

5) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int litr;

cout << "Введите масу в литрах : ";


cin >> litr;

cout << "Маса в милилитрах : ";

cout << lirt * 1000 << endl;

return 0;

6) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int grivna;

cout << "Введите цену в гринах : ";


cin >> grivna;
cout << "Цена в копейках : ";

cout << grivna * 60 << endl;

return 0;

7) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

double choc, molok, masloo , vsego;

cout << "Введите стоимость шоколадки : ";


cin >> choc;
cout << "Введите стоимость молока : ";
cin >> molok;
cout << "Введите стоимость масла : ";
vsego = choc + molok + masloo ;
cout << "Продукты стоят : " << vsego;

return 0;

8) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

const double dizel = 36.9;


double baka, ravno;
cout << "Введите обьем бака : ";
cin >> baka;
ravno = baka * dizel;
cout << "Стоимость полного бака : " << ravno << " " << "грн ";

return 0;

9) #include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int gektar;

cout << "Введите площадь в гектарах : ";


cin >> gektar;

cout << "Площадь в квадратных метрах : ";


cout << gektar * 10000 << endl;

return 0;

10) #include <iostream>


using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int karat;

cout << "Введите масу диаманта в каратах : ";


cin >> karat;

cout << "Маса в грамах : ";

cout << karat * 0.2 << endl;

return 0;

11) #include <iostream>


using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int ton, cent, kg;


cout << "Введите количсетво тонн : ";
cin >> ton;
cent = ton * 10;
kg = ton * 1000;
cout << ton << " тонн = " << " " << cent << " центнеров = " << " " << kg << " килограмов ";

12) #include <iostream>


using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int a, b, ravno;
cout << "Введите количсетво процентов :";
cin >> a;
cout << "Введите число от которого хотите узнать процент : ";
cin >> b;
ravno = (b / 100) * a;
cout << a << " процент от числа " << b << " составит " << ravno;

return 0;
}

13) #include <iostream>


using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");

int lm, grn, cis;


cout << " Введите стоимость молока за литр : ";
cin >> grn;
cout << " Введите обьем цистерны : ";
cin >> cis;
lm = cis * grn;
cout << " Полнай цистерна обойдеться в " << lm << " грн ";

return 0;

Вам также может понравиться