Професионална програма
Loading...
LoshaPanda avatar LoshaPanda 10 Точки

Product sign{2} - C++ fundamentals

Извинете ме, но не мога да си намеря грешка. Може ли някой да ме поправи ако вижда такава ?

 

#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main() {

	double n, n1, n2, k = 0;

	cin >> n >> n1 >> n2;

	if (n < 0){
		k++;
	}
	if (n1 < 0){
		k++;
	}
	if (n2 < 0){
		k++;
	}

	if (k == 1)
	{
		cout << '-';
	} else if (k == 2) {
		cout << '+';
	} else if (k == 3) {
		cout << '-';
	} else if (k == 0){
		cout << '+';
	}

}

 

Тагове:
0
C++ Programming
darwinscoop avatar darwinscoop 1 Точки

Take your cooking style into consideration while choosing the best garlic press this is finely fit in your requirements. A chrome steel variant is more appropriate for continuous use, best garlic chopper while a plastic model will accomplish similar results when used best sometimes.

0