Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab5 (248)

Snippet info

Language

Cpp

Visibility

public

Author

andrusus.korotkovus

Created

2018-10-30T06:48:55Z

Updated

2018-10-30T06:48:55Z

#include<iostream>
#include<cmath>

using namespace std;

int main()
{
	int a, b, h, x;
	double F;

	cout << "Введите предел а и b " << endl;
	cin >> a
		>> b;

	cout << "Введите шаг h" << endl;
	cin >> h;

	
	x = a;

	while (x <= b)
	{
		F = sin(x) + 0.5*cos(x);
		
		x += h;
	}
	cout << "\tРезультат - " << x;

	return 0;
}
INFO