Skip to content

Instantly share code, notes, and snippets.

@Lotuashvili
Created November 21, 2014 12:09
Show Gist options
  • Save Lotuashvili/bfdf069c628f3a619959 to your computer and use it in GitHub Desktop.
Save Lotuashvili/bfdf069c628f3a619959 to your computer and use it in GitHub Desktop.
ამოცანა 1
//
// 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