Stack Input Output


#include<iostream.h>
#include<conio.h>
main(){
int nilai[2];
cout<<"menyimpan inputan user"<<endl;
cout<<"----------------------"<<endl;
for (int i=0;i<2;i++)
   {
   cout<<"Masukkan nilai ke-"<<i<<": ";
   cin>>nilai[i];
   }
cout<<endl;
cout<<"menampilkan inputan user"<<endl;
cout<<"------------------------"<<endl;
for (int i=0;i<2;i++)
{
   cout<<"nilai ke-"<<i<<" : ";
   cout<<nilai[i]<<endl;
   }


getch();
}

Comments

Popular posts from this blog

Animasi Lucu C++

Sistem Sensor dan Robotika

DDL Part II