Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
418 B
0
Indexable
Never
#include <iostream>
using namespace std;

int sumar(int a, int N, int M, int S, int B) {
	int Szem = N * M;
	int stoumZemla = Szem * a;

	int sumaDom = S * B;

	int allSuma = stoumZemla + sumaDom;
	cout << allSuma;
	return allSuma;
}



int main() {
	int a;//stoumost
	cin >> a;
	int N, M;//dlina
	cin >> N >> M;
	int S;//plochad doma
	cin >> S;
	int B;//dom
	cin >> B;

	sumar(a,N,M,S,B);
}
Leave a Comment