Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program is to create a file student.dat:
Program is to create a file student.dat which contains all name, roll_no,marks(5 sub) and percentage
class student
{
private:
char name[20];
int roll;
int marks[5];
int total;
float perc;
public:
student()
total=0;
}
void input();
void output();
};
void student::input()
clrscr();
cout<<" enter your name ";
gets(name);
cout<<" enter your roll no. ";
cin>>roll;
cout<<" enter the marks of five subjects "<<"\n";
for (int i=0;i<5;i++)
cout<<" enter marks";
cin>>marks[i];
total=total + marks[i];
void student::output()
perc=total/5;
if (perc>=60)
cout<<" the name is "< cout<<" the total marks obtained out of (500) "< cout<<" the percentage "< } else cout<<" the percten tage is less then 60 "; } void main() { clrscr(); student info; fstream file; file.open("student.dat",ios::in|ios::out); int n; cout<<" enter the number for which u want to enter data"; cin>>n; for(int i=1;i<=n;i++) { info.input(); file.write((char *)& info,sizeof(info)); } file.close(); file.open("student.dat",ios::in); while(file) { file.write((char *)& info,sizeof(info)); info.output(); } file.close(); }
cout<<" the total marks obtained out of (500) "< cout<<" the percentage "< } else cout<<" the percten tage is less then 60 "; } void main() { clrscr(); student info; fstream file; file.open("student.dat",ios::in|ios::out); int n; cout<<" enter the number for which u want to enter data"; cin>>n; for(int i=1;i<=n;i++) { info.input(); file.write((char *)& info,sizeof(info)); } file.close(); file.open("student.dat",ios::in); while(file) { file.write((char *)& info,sizeof(info)); info.output(); } file.close(); }
cout<<" the percentage "< } else cout<<" the percten tage is less then 60 "; } void main() { clrscr(); student info; fstream file; file.open("student.dat",ios::in|ios::out); int n; cout<<" enter the number for which u want to enter data"; cin>>n; for(int i=1;i<=n;i++) { info.input(); file.write((char *)& info,sizeof(info)); } file.close(); file.open("student.dat",ios::in); while(file) { file.write((char *)& info,sizeof(info)); info.output(); } file.close(); }
else
cout<<" the percten tage is less then 60 ";
void main()
student info;
fstream file;
file.open("student.dat",ios::in|ios::out);
int n;
cout<<" enter the number for which u want to enter data";
cin>>n;
for(int i=1;i<=n;i++)
info.input();
file.write((char *)& info,sizeof(info));
file.close();
file.open("student.dat",ios::in);
while(file)
info.output();
Aim: To implement a program to create, update & display account & admin record of person using display account & admin records of person using virtual base class.. Code:
Constructor and Destructor function with derived classes If there are constructors included in the base class and the derived class, the compiler automatically calls both of th
Aim: To implement a program to handle stack overflow, underflow and odd number exception using Exception Handling. Code: #include #include #include #define MAX
show algorathim
Estimation of the yield curve using nonlinear least squares minimization: The last part of this assignment asks you to construct the Nelson Siegel yield curve from observed bond pr
Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.
write a program for convert numbers upto 9 to alphabet?Eg.now enter the inputis 666 means output is "0" lphabet
6#666#665533999 where # is used as space.output is monkey
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
Armed with your function from above, we can do some interesting things. For instance, any pixel where the offsets are both zero is a pit (lower than all surrounding points) .
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd