#include <stdio.h> #include <dos.h> #include <conio.h> int main() { float grossSales, salary, baseSalary=200, commissionRate=.09; clrscr(); gotoxy(25,10); printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); gotoxy(25,15); printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); gotoxy(25,11); printf("X X"); gotoxy(25,12); printf("X X"); gotoxy(25,13); printf("X X"); gotoxy(25,14); printf("X X"); gotoxy(30, 12); printf("Enter the Gross Sales: "); scanf("%f" , &grossSales); salary = baseSalary + (grossSales * commissionRate); gotoxy(30, 13); printf("The salary is: %.2f" , salary); getch(); return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter