-
July 17th, 2009, 05:11 AM
#1
Simple programming doubt
Designation of the Employee according to salary
#include<iostream.h>
#include<conio.h>
void main()
{
float sal;
clrscr();
cout<<"Enter the salary of employee:";
cin>>sal;
if (sal<20000)
{
if(sal<=10000)
cout<<"clerk"<<endl;
else
cout<<"Assistant manager:"<<endl;
}
else
cout<<"Manager"<<endl;
Is this program code right, if it is can you explain why ther is sal<20000 and sal<=10000
and also how can Assitant manager and Manage can be diffrentiated
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|