#include<iostream>
#include<string>
using namespace std;
void main()
{
int i,j;
int data[2][2];
cout<<"ARRAY DUA DIMeNSI"<<endl;
cout<<"********************************"<<endl;
cout<<"INPUT DATA ARRAY"<<endl;
cout<<"********************************"<<endl;
{
for (j=0;j<2;j++)
{
cout<<"INPUT ATA ARRAY ke-["<<i+1<<" "<<j+1<<"]:";
cin>>data[i][j];
}
}
cout<<"*****************************"<<endl;
cout<<"OUPUT DATA ARRAY"<<endl;
cout<<"*****************************"<<endl;
for (i=0;i<2;i++)
{
for (j=0;j<2;j++)
{
cout<<"OUTPUT DATA ARRAY ke-["<<i+1<<" "<<j+1<<"]:"<<data[i][j]<<endl;
cin>>data[i][j];
}
}
cout<<"*****************************"<<endl;
system("pause");
}
1 Response so far.
Langganan:
Posting Komentar (Atom)
array suhu
#include
#include
#include
using namespace std;
void main()
{
int i,j;
float suhu[5];
cout<<"INPUT SUHU"<>suhu[i];
}
cout<<"********************"<<endl;
cout<<"SUHU YANG ANDA INPUT"<<endl;
cout<<"********************"<<endl;
for (j=0;j<5;j++)
{
cout<<"Suhu ke -"<<j+1<<":"<<suhu[j]<<endl;
}
system("pause");