#include <cstdlib>
#include <iostream>
#include <fstream.h>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
int input;
int nilai;
char nama[20][20];
char nim[20][20];
ofstream fileout;
fileout.open("fajar.040");
cout<<"masukkan jumlah inputan : ";
cin>>input;
cout<<endl;
for (int i=0;i<input;i++){
cout<<"masukkan NAMA : ";
cin>>nama[i];
cout<<"masukkan NIM : ";
cin>>nim[i];
}
cout<<endl;
cout<<endl;
cout<<"NIM\t\t\tNAMA"<<endl;
for (int i=0;i,i<input;i++){
cout<<nim[i]<<"\t\t"<<nama[i]<<endl;
}
fileout<<"NIM\t\tNAMA\n"<<endl;
for(int i=0;i,i<input;i++){
fileout<<nim[i]<<"\t\t"<<nama[i]<<endl;
fileout<<endl;
}
#include <iostream>
#include <fstream.h>
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
int input;
int nilai;
char nama[20][20];
char nim[20][20];
ofstream fileout;
fileout.open("fajar.040");
cout<<"masukkan jumlah inputan : ";
cin>>input;
cout<<endl;
for (int i=0;i<input;i++){
cout<<"masukkan NAMA : ";
cin>>nama[i];
cout<<"masukkan NIM : ";
cin>>nim[i];
}
cout<<endl;
cout<<endl;
cout<<"NIM\t\t\tNAMA"<<endl;
for (int i=0;i,i<input;i++){
cout<<nim[i]<<"\t\t"<<nama[i]<<endl;
}
fileout<<"NIM\t\tNAMA\n"<<endl;
for(int i=0;i,i<input;i++){
fileout<<nim[i]<<"\t\t"<<nama[i]<<endl;
fileout<<endl;
}
Tidak ada komentar:
Posting Komentar