02: Write a program to input the worker name, worker code number, no
worked and rate per hour. Calculate and print the total wages of the worker.
Answers
Answered by
6
Answer:
#include<iostream.h>
#include<string.h>
void main()
{
char na[45];
int c,h;
float r;
cout<<"\n Worker name: ";
gets(na);
cout<<"\n Worker code: ";
cin>>c;
cout<<"\n hour worked: ";
cin>>h;
cout<<"\n Rate: ";
cin>>r;
float total= r*(float)h;
cout<<"\n Total wage of worker of code "<<c<<" will be "<<total;
}
Similar questions