Question #165468

Write a Qbasic program to triple the salary of workers


Expert's answer

#include <stdio.h>
void main()
{        
int i,n,sum=0;
float average;
printf("Please enter the salary of 3 employees: \n");
for (i=1;i<=3;i++)
{
printf("Salary from the employee %d :",i);
scanf("%d",&n);
 sum +=n;
}
average=sum/3.0;
printf("The average salary : %f\n",avg);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS