Program to Store and Display the details of Mobile | C++ Programming
Friday, February 28, 2020//program to store and display the details of mobile
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
struct MOBILE
{int IMEIno;
char modelno[20];
char brand[30];
char details[20];
}MOB;
int i,n,IMEINO;
void main()
{clrscr();
int modelno;
char brand;
char details;
int flag=0;
{ cout<<"\n Enter no.ofmobiles:";
cin>>n;
cout<<"\n Enter modelno. of mobile:";
cin>>(modelno) ;
cout<<"\n Enter brand of mobile:";
gets(brand[i]);
cout<<"\n Enter details of mobile:";
gets(details[i])
getch();
}
cout<<"\n Enter the IMEINO to be searched:";
cin>>IMEINO;
for (i=0;i<n;i++)
{if(flag==1)
cout<<" mobile[i].mobile.modelno" <<"mobile[i].mobile. brand"
<<"mobile[i].mobile.modetails"<<(i+1);
else
cout<<"\n mobile not found:";
}
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
struct MOBILE
{int IMEIno;
char modelno[20];
char brand[30];
char details[20];
}MOB;
int i,n,IMEINO;
void main()
{clrscr();
int modelno;
char brand;
char details;
int flag=0;
{ cout<<"\n Enter no.ofmobiles:";
cin>>n;
cout<<"\n Enter modelno. of mobile:";
cin>>(modelno) ;
cout<<"\n Enter brand of mobile:";
gets(brand[i]);
cout<<"\n Enter details of mobile:";
gets(details[i])
getch();
}
cout<<"\n Enter the IMEINO to be searched:";
cin>>IMEINO;
for (i=0;i<n;i++)
{if(flag==1)
cout<<" mobile[i].mobile.modelno" <<"mobile[i].mobile. brand"
<<"mobile[i].mobile.modetails"<<(i+1);
else
cout<<"\n mobile not found:";
}
0 Comments