Created
November 21, 2014 12:09
-
-
Save Lotuashvili/bfdf069c628f3a619959 to your computer and use it in GitHub Desktop.
ამოცანა 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// amocana1 | |
// | |
// Created by GWSMaster on 08.10.14. | |
// Copyright (c) 2014 GWSMaster. All rights reserved. | |
// | |
#include <iostream> | |
using namespace std; | |
int main() { | |
double a,b,c; | |
int uaryopiti = 0; | |
cout << "Shemoitanet sami ricxvi: \n"; | |
cin >> a >> b >> c; | |
if ( a < 0 ) { | |
uaryopiti += 1; | |
a = a*a; | |
} else a = a*2; | |
if ( b < 0 ) { | |
uaryopiti += 1; | |
b = b*b; | |
} else b = b*2; | |
if ( c < 0 ) { | |
uaryopiti += 1; | |
c = c*c; | |
} else c = c*2; | |
cout << "\nUaryopitia " << uaryopiti << " ricxvi"; | |
cout << "\n"; | |
cout << "Shedegi: " << a << "\t" << b << "\t" << c << "\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment