Create a Basic Diary For The House in C++ Programming Language
#include<conio.h>
#include<iostream.h>
#include<string.h>
class driver
{
char f_name[10],f_add[15],f_city[15],f_gen[10],f_mo[10];
double f_age;
public:
driver(char name[10],char add[15],char city[15],char gen[10],char mo[10],double age)
{
strcpy(f_name,name);
strcpy(f_add,add);
strcpy(f_city,city);
strcpy(f_gen,gen);
strcpy(f_mo,mo);
f_age=age;
}
void output();
};
void driver::output()
{
clrscr();
cout<<"\n\tFaculty Name :-\t"<<f_name;
cout<<"\n\tFaculty Address :-\t"<<f_add;
cout<<"\n\tFaculty City :-\t"<<f_city;
cout<<"\n\tFaculty Gender :-\t"<<f_gen;
cout<<"\n\tFaculty Mobile No:-\t"<<f_mo;
cout<<"\n\tFaculty Age :-\t"<<f_age;
}
void main()
{
char f_name[10],f_add[15],f_city[15],f_gen[10],f_mo[10];
double f_age;
textcolor(111);
clrscr();
cout<<"\n\tEnter Faculty Name :-\t";cin>>f_name;
cout<<"\n\tEnter Faculty Address :-\t";cin>>f_add;
cout<<"\n\tEnter Faculty City :-\t";cin>>f_city;
cout<<"\n\tEnter Faculty Gender :-\t";cin>>f_gen;
cout<<"\n\tEnter Faculty Mobile No :-\t";cin>>f_mo;
cout<<"\n\tEnter Faculty Age :-\t";cin>>f_age;
driver p(f_name,f_add,f_city,f_gen,f_mo,f_age);
p.output();
getch();
}
#include<iostream.h>
#include<string.h>
class driver
{
char f_name[10],f_add[15],f_city[15],f_gen[10],f_mo[10];
double f_age;
public:
driver(char name[10],char add[15],char city[15],char gen[10],char mo[10],double age)
{
strcpy(f_name,name);
strcpy(f_add,add);
strcpy(f_city,city);
strcpy(f_gen,gen);
strcpy(f_mo,mo);
f_age=age;
}
void output();
};
void driver::output()
{
clrscr();
cout<<"\n\tFaculty Name :-\t"<<f_name;
cout<<"\n\tFaculty Address :-\t"<<f_add;
cout<<"\n\tFaculty City :-\t"<<f_city;
cout<<"\n\tFaculty Gender :-\t"<<f_gen;
cout<<"\n\tFaculty Mobile No:-\t"<<f_mo;
cout<<"\n\tFaculty Age :-\t"<<f_age;
}
void main()
{
char f_name[10],f_add[15],f_city[15],f_gen[10],f_mo[10];
double f_age;
textcolor(111);
clrscr();
cout<<"\n\tEnter Faculty Name :-\t";cin>>f_name;
cout<<"\n\tEnter Faculty Address :-\t";cin>>f_add;
cout<<"\n\tEnter Faculty City :-\t";cin>>f_city;
cout<<"\n\tEnter Faculty Gender :-\t";cin>>f_gen;
cout<<"\n\tEnter Faculty Mobile No :-\t";cin>>f_mo;
cout<<"\n\tEnter Faculty Age :-\t";cin>>f_age;
driver p(f_name,f_add,f_city,f_gen,f_mo,f_age);
p.output();
getch();
}
Create a Basic Diary For The House in C++ Programming Language
Reviewed by Unknown
on
6:16:00 PM
Rating:
No comments: