-->

Mencari Bilangan Terbesar Diantara Dua Buah Inputan Menggunakan C++

Tentukan nilai terbesar dari antara dua buah inputan. Buatlah code menggunakan C++.

Code :



 
#include
#include

void main() {

 int x, nilai_a, nilai_b, nilai_c;

   cout << "Masukkan Nilai A : ";
   cin >> nilai_a;
   cout << "Masukkan Nilai B : ";
   cin >> nilai_b;
   cout << "Masukkan Nilai C : ";
   cin >> nilai_c;

   if (nilai_a >= nilai_b)
    cout << nilai_a;

   else if

   else
        cout << nilai_c;


 getch();
};
 


Hasil :

Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 komentar

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© 2011 Onemedia | 2012 Templates
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0
Posts RSSComments RSS
Back to top