// /3 /3 /3 Array /3 /3 /3
#include <iostream>
#include <string>
using namespace std;
void InputData(string (&angka) [3] [2])
{
string nama;
for (int a=0;a<3;a++)
{
cout << "Masukkan Nama Mahasiswa: "; cin >> angka [a] [0];
getline (cin, nama);
cout << "Masukkan Nilai Mahasiswa: "; cin >>angka [a] [1];
getline (cin,nama);
}
}
void main ()
{
string angka [3] [2];
InputData (angka);
cout << endl;
cout << "DATA MAHASISWA";
cout << endl;
cout << "\t ******************************** " <<endl;
cout << "\t|\tNAMA\t|\tNILAI\t|"<<endl;
cout << "\t ******************************** " <<endl;
for (int a=0;a<3;a++)
{
cout << "\t|\t" << angka [a] [0] << "\t|"<< "\t" << angka [a] [1] << "\t|" << endl;
}
cout << "\t ******************************** "<<endl;
system ("pause");
}
Jumat, 23 November 2012
Program String Array
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar
Budayakan Share ^_^