Skip to content

Instantly share code, notes, and snippets.

@thedrint
Created November 4, 2016 20:39
Show Gist options
  • Save thedrint/073b6ed57ded5e3d4bfe7175d9363f11 to your computer and use it in GitHub Desktop.
Save thedrint/073b6ed57ded5e3d4bfe7175d9363f11 to your computer and use it in GitHub Desktop.
Задачка на C
#include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
int main() {
int a,b,c;
cout << "веди 3 числа" << endl;
cin >> a >> b >> c;
if (c < 0) {
cout << "C меньше 0";
// return 0;
}
if (c < 0) {
cout << "C меньше 0";
// return 0;
}
if (c < 0) {
cout << "C меньше 0";
// return 0;
}
if(a >= b){
if(a > c) cout << a << endl;
}else if(b > a){
if(b > c) cout << b << endl;
}else if(c > a){
if(c > b) cout << c << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment