1
#include<iostream>
#include<string.h>
using namespace std;

int main ()
{
int i,k=6;       
struct BookList
{
       string title;
       string author;
       string publisher;
       int year;
};   BookList kniga[k];

//------------------------------------

for(i=0;i<5;i++)
cout<<"Vavedete dannite za kniga "<<i<<endl;
cout<<"Zaglavie ";
getline(cin,kniga.title[i]);
cout<<"---------------------"<<endl;
cout<<"Avtor ";
getline(cin,kniga.author[i]);
cout<<"---------------------"<<endl;
cout<<"Izdatelstvo ";
getline(cin,kniga.publisher[i]);
cout<<"---------------------"<<endl;
cout<<"Godina ";
getline(cin,kniga.year[i]);
cout<<"---------------------"<<endl;

//------------------------------------

for(i=0;i<5;i++)
cout<<"Spisak s vavedeni knigi "<<endl;
cout<<"------------------------"<<endl;
cout<<"Kniga "<<i<<endl;
cout<<"Zaglave "<<kniga.title[i]<<endl;
cout<<"Avtor "<<kniga.author[i]<<endl;
cout<<"Izdatelstvo "<<kniga.publisher[i]<<endl;
cout<<"Godina "<<kniga.year[i]<<endl;
cout<<"-------------------------"<<endl;

//-------------------------------------- system("pause"); 返回0;首先很抱歉这个问题我知道它被问了很多次,但我需要你的帮助我做错了什么,找不到什么

4

0 回答 0