saneha
05-02-2011, 06:40 AM
#include<iostream.h>
using namespace std;
class Student
{
private:
int rollNo;
public:
void setRollNo(int aRollNo);
};
void Student::setRollNo(int aRollNo){
if(aRollNo>0){
cout<<"you are a student of vitual university";
}
else{
cout<<"you are not student of virtual univerity";
}
}
int main()
{
Student astudent;
astudent.setRollNo(500);
system("pause");
return 0;
}
using namespace std;
class Student
{
private:
int rollNo;
public:
void setRollNo(int aRollNo);
};
void Student::setRollNo(int aRollNo){
if(aRollNo>0){
cout<<"you are a student of vitual university";
}
else{
cout<<"you are not student of virtual univerity";
}
}
int main()
{
Student astudent;
astudent.setRollNo(500);
system("pause");
return 0;
}