create a class named 'student' with a string variable 'name' and an integer variable 'roll_no'. Assign the value of roll_no as '2' and that name as "john" by creating an object of the class student.
in a company an employee is paid as follows; if his basic salary is less than 50,000 then house allowance is 10% and inflation allowance is 5% of basic salary. if his salary is equal to or above 50,000 then his house allowance is equal to 10,000 and inflation allowance is 8% of basic salary. if the employee basic salary is input by the user, write a c++ program to find an employee's gross salary
write a c++ program that tells you if a number is odd or even
what will happen when you run the following program?
#include<iostream>
void main()
{
int i=10, j=5;
int modResult=0;
in divResult=0;
modResult=i%j;
cout<<modResult<< " ";
divResult=i/modResult;
cout<<divResult;
}
identify errors in the following c++ program
#include<iostream>
void main()
{
int i=0;
i=i+1;
cout <<i << " " ;
/*comment \*//i=i+1;
cout <<i;
}
after the execution of the following code, what will be the value of x?
int x=5;
if(x>5)
x=x+10;
else if(x<3)
x=x-5;
else x=100;