ccc+++

ccc+++


#include<iostream>


#include<windows.h>



using namespace std;


 




struct attribs


{


 char name[64];


 int ident;


 char group[64];


 int nkurs;


 int cdel;  


 bool cbool;


};


 


void showData(const attribs Obj[], int amount);


 


int main()


{


 setlocale(LC_ALL, "rus");


 


 const int crows = 3;


 attribs dz[crows] = {};


 


 for (int i = 0; i < crows; i++)


 {


 cout << "Èìÿ: ";


 cin.getline(dz[i].name, 32);


 cout << "ID: ";


 cin >> dz[i].ident;


 cout << "Ãðóïïà: ";


 cin.getline(dz[i].group, 32);


 cout << "Êóðñ: ";


 cin >> dz[i].nkurs;


 cout << "BOOL (1 - 1, 0 - 0): ";


 cin >> dz[i].cbool;



 cin.get();


 cout << endl;


 } 


 


 showData(dz, crows);


 


 return 0;


}


 


void showData(const attribs Obj[], int amount)


{


 system("cls");


 cout << "ID\t" << "Imya\t" << "0\t" << "Kurs\t\t" << "Bool\t\t\t" << endl;


 cout << "==================================================================" << endl;


 for (int i = 0; i < amount; i++)


{  


 cout << i + 1 << '\t' << Obj[i].name << '\t' << Obj[i].ident 


 << '\t' << Obj[i].group << '\t' << Obj[i].nkurs << '\t'


// << Obj[i].cdel.idd1 << '/' << Obj[i].cdel.idd2 << '/' << Obj[i].cdel.idd3


 << '\t' << Obj[i].cbool << endl;


}


}