Berlangganan

About Me


contoh 9

# include <iostream.h>

void main ()
{
    int m = 5, n =7;
    if(m == n) cout<<m<<"sama dengan "<<n<<endl;
    else if(m != n) cout<<m<<" tidak sama dengan "<<n<<endl;
    else if(m > n) cout<<m<<" lebih besar dari "<<n<<endl;
    else if(m < n) cout<<m<<" lebih kecil dari "<<n<<endl;
}

output

5 tidak sama dengan 7

Related Posts :

  • contoh 20 # include  <iostream.h> void main () {   int m = 166;     if(m == … Read More...
  • contoh 18 # include <iostream.h> # include <conio.h> void main () {  int nilai;  clrsc… Read More...
  • contoh 19 // contoh penggunaan if # include <iostream.h> void main() {     int usia; &… Read More...
  • contoh 16 # include <iostream.h> void main () {     char nama[100]; // Deklarasi varia… Read More...
  • contoh 17 // program untuk mempertukarkan nilai A dengan nilai B # include <iostream.h> void main () {… Read More...

0 Response to "contoh 9"

Post a Comment