Posts

Showing posts from August, 2017

C++ program which takes the book parameters and display them using structures

Image
#include<iostream> using namespace std; struct bookdetails { char name[50]; int page; char author[50]; string ibn;}; int main() { int i=1,j=1,k=1,l=1; struct bookdetails b1,b2,b3; while (i<=1) { cout<<"enter book names 1-3 "; i++; } cin>>b1.name>>b2.name>>b3.name; while (j<=1) {cout<<"no of pages of book 1-3 "; j++; } cin>>b1.page>>b2.page>>b3.page; while(k<=1) {cout<<"author name of book 1-3 "; k++; } cin>>b1.author>>b2.author>>b3.author; while (l<=1) { cout<<"IBN of book 1-3 "; l++; } cin>>b1.ibn>>b2.ibn>>b3.ibn; cout<<endl; cout<<"book name "<<b1.name<<endl; cout<<"pages "<<b1.page<<endl; cout<<"author "<<b1.author<<endl; cout<<"IBN "<<b1.ibn<<endl; cout<<endl; cout<...