Facebook
From Denim Crow, 5 Years ago, written in Plain Text.
This paste is a reply to Untitled from Sludgy Crow - view diff
Embed
Download Paste or View Raw
Hits: 422
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  7.  
  8. int main(void) {
  9.        
  10.         float a, b, c;
  11.         float wynik;
  12.        
  13.         cin >> a;
  14.         cin >> b;
  15.         cin >> c;
  16.        
  17.         if((a > b) && (a > c))
  18.                 wynik = a;
  19.         else if((b > a) && (b > c))
  20.                 wynik = b;
  21.         else if ((c > a) && (c > b))
  22.                 wynik = c
  23.                        
  24.         if(wynik = a)
  25.                 cout << "Max(a,b,c)= " << fix << setprecision(2) << a << endl;
  26.         else if(wynik = b)
  27.                 printf("Max(a,b,c)=%.2f",b);
  28.         else if(wynik = c)
  29.                         printf("Max(a,b,c)=%.2f",c);
  30.                        
  31.                
  32.         cin >> ignore();
  33.        
  34.         return 0;
  35. }

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled Edgy Matamata text 5 Years ago.