Looking for a similar answer, essay, or assessment help services?

Simply fill out the order form with your paper’s instructions in a few easy steps. This quick process ensures you’ll be matched with an expert writer who
Can meet your papers' specific grading rubric needs. Find the best write my essay assistance for your assignments- Affordable, plagiarism-free, and on time!

Posted: January 29th, 2025

Write a Program to perform Weekly Department Salary Report program

Question description

Whenever a user inputs anything besides a "single" word, the program crashes. I tried using fgets and sscanf, but then it doesnt prompt the user to input anything at all.. Help~ Below is my code. Another question is, how to align the output in a straight line? Everytime the digit is different, the alignment screws up.My code/* A Program to perform Weekly Department Salary Report program*/#include #include #include int main(void){FILE *f;    f = fopen("c:classpay.txt","w");    if (f == NULL){    printf("Error opening file!n");    exit(1);}char dname[21],ename[100][21],sname[100][21],name[100][21],uantity[5];char artist[21];int credit;int i =0,j,len,bal;float stotal[100],total[100],finaltot, hwage[100],otime[100],owage[100],gross[100],trwork=0,towork=0,trwage=0,towage=0,totwage=0,percent=0;char pay;    char exit ='y';char output[500] = "";  printf("Mountain Pacific Corporationn");printf("Department Salary Programnn"); printf("Please enter the name of the department:  ");    scanf("%s",&dname);do{/*    printf("Enter employee first name#%d:  ",i+1);    scanf("%s",&ename[i]);    printf("Enter employee second name#%d:  ",i+1);    scanf("%s",&sname[i]);     strcat(ename[i]," ");    strcat(ename[i],sname[i]);       len = strlen(ename[i]);     if (len < 21) for (j = 1; j < (21 - len); j++)strcat(ename[i],"");   *//// The above code still doesn't work.printf("Enter employee #%d: ",i+1);scanf("%s",ename[i]);//scanf("%[^ n]s",ename[i]);  //scanf("%i[^n]", ename[i]);    printf("Enter the hourly wage of %s :",ename[i]);    scanf("%f",&hwage[i]);    printf("Enter total number of hours: ");    scanf("%f",&total[i]);    printf("nnThank you. Process another employee? ");    scanf("%s",&pay);    i = i + 1;   }while (pay == 'y' || pay == 'Y');             fprintf(f,"nnMountain Pacific Corporation");fprintf(f,"nnDepartment Salary Program");fprintf(f,"nnDepartment: %s",&dname);fprintf(f,"nnEmployee                Reg Hrs        Overtime Hrs       Grossn");fprintf(f,"-----------------------------------------------------------------n"); for (j=0;j

Tags: Academic Paper Assistance, Assignment Help Australia, Cheap Essay Writing Service, Dissertation Writing Services

Order|Paper Discounts

Why Choose Essay Bishops?

You Want The Best Grades and That’s What We Deliver

Top Essay Writers

Our top essay writers are handpicked for their degree qualification, talent and freelance know-how. Each one brings deep expertise in their chosen subjects and a solid track record in academic writing.

Affordable Prices

We offer the lowest possible pricing for each research paper while still providing the best writers;no compromise on quality. Our costs are fair and reasonable to college students compared to other custom writing services.

100% Plagiarism-Free

You’ll never get a paper from us with plagiarism or that robotic AI feel. We carefully research, write, cite and check every final draft before sending it your way.