Student Info using Class – Algorithms & Data Structures in C++

#include<iostream>
using namespace std;
class student{
public:
string c[4];
float percentage[4];
int range;
void setstudentinfo(){
cout<<“enter number of student whose record you want to save \n”;
cin>>range;
for(int k=0;k<range;k++){

cout<<“\n enter name and regno”<<k+1;
cin>>c[k];}
for(int k=0;k<range;k++){

cout<<“\n enter percentage of student”<<k+1;
cin>>percentage[k];
}
}

void getstudentinfo(){
for(int k=0;k<range;k++){

cout<<“\nstudent is\n”<<k+1<<“regno and name is\n”<<c[k];
if(percentage[k]>=70){
cout<<“\n pass”;}
else
cout<<“\n fail”;

}
}

};
int main(){
student a;
a.setstudentinfo();
a.getstudentinfo();
return 0;
}