1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include "stdafx.h"
#include <iostream>
#include <string>
#include <iomanip>
using namespace std ;
using namespace System ;
void userInterface() ;
int main ()
{
userInterface() ;
system ("pause") ;
return 0 ;
}
void userInterface()
{
string topBar[] = {"-BRAND-","-MODEL-","-FREQUENCY-","-CORE-","-THREAD-","-PRICE-"} ;
string gCard1[] = {"INTEL","Dualcore G630","2.70","2","2","164"} ;
string gCard2[] = {"Ivybridge","Xeon E3-1245V2","3.40","4","8","865"} ;
string gCard3[] = {"Ivybridge","Core i3 - 3220","3.30","2","4","359"} ;
string gCard4[] = {"Ivybridge","Core i5 - 3570","3.40","4","4","564"} ;
string gCard5[] = {"Ivybridge","Core i7 - 3770","3.40","4","8","889"} ;
int gCardNull[99] = {topBar[],gCard1[],gCard2[],gCard3[],gCard4[],gCard5[]} ;
int i, j ;
int x ;
for (i=0 ; i<6 ; i++)
{
if(i==1)
{
cout.width(25) ;
x = 18 ;
}
else
{
cout.width(15) ;
x = 12 ;
}
cout<< setiosflags( ios::left )
<< setw(x) ;
for (j=0 ; j<6 ; j++)
{
cout << gCardNull[j] ;
}
}
cout << endl ;
}
|