MATERI-MATERI MATA KULIAH SISTEM INFORMASI STMIK MDP

Pasang Iklan Gratis Disini !!!

ads ads ads ads

Selasa, 29 Maret 2011

Mencari bilangan terbesar diantara bilangan

. Selasa, 29 Maret 2011

//Mencari bilangan terbesar diantara bilangan
cout<<"masukkan banyak bilangan, n=";cin>>x;
if(x>max)
max=x;
}
cout<<"Bilangan terbesar dari :"<<max;


==============================
#include <iostream>
using namespace std;
void main(){
    for (int i=1;i<5;i++)
    {for(int j=5;j<7;j++)
        cout<<"*";
    cout<<endl;
}
system ("pause");
}

=============================
#include <iostream>
using namespace std;
void main(){
    for (int i=1;i<3;i++)
    {for(int j=5;j<8;j++)
        cout<<1;
    cout<<endl;
}
system ("pause");
}

=============================
#include <iostream>
using namespace std;
void main(){
    for (int i=1;i<4;i++)
    {for(int j=5;j<8;j++)
    if (i==1||i==3)
        cout<<1;
    else
        cout<<0;
    cout<<endl;
}
system ("pause");
}

SEMOGA BERMANFAAT

0 komentar:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Posting Komentar

Tuliskan Komentar Disini..

Related Posts Plugin for WordPress, Blogger...
 
{Sistem Informasi} is proudly powered by Blogger.com | Template by : Sukriyadi | sukriyadi.blogspot.com