Write a Qbasic program to triple the salary of workers
#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);
}
Comments
Leave a comment