RieqyNS13 icon

Untitled

RieqyNS13 | PRO | 02/04/13 03:13:15 PM UTC | 0 ⭐ | 328 👁️ | Never ⏰ | []
C++ |

620 B

|

None

|

0 👍

/

0 👎

#include <iostream>
#include <windows.h>
#include <iomanip>
using namespace std;
int main(){
    char *kode_barang[] = {"b1", "b2", "b3", "b4", "b5"};
    char *nama_barang[] = {"Monitor", "Keyboard", "Mouse", "Joystick", "Speaker"};
    unsigned long int harga_barang[] = {10000, 15009, 506, 3697, 264};
    char input_barang;
    int size=sizeof(kode_barang)/sizeof(int);
    cout<<"Kode\t"<<"\tBarang\t"<<"\tHarga\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
    for (int a=0; a<size; a++){
        cout<<setiosflags(ios::right)<<kode_barang[a]<<"\t\t"<<nama_barang[a]<<"\t\t"<<setiosflags(ios::right)<<harga_barang[a]<<endl;  
    }
    return 0;
}

Comments