Last active
April 4, 2019 19:03
-
-
Save anonur/ec8b9edb0c79288e8175a6c5c2aaf4e5 to your computer and use it in GitHub Desktop.
Calculates the commission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
float sales; | |
float salary; | |
while(sales != -1) { | |
printf("Enter sales in dollars (-1 to end): "); | |
scanf("%f",&sales); | |
if(sales == -1) { | |
break; | |
} | |
else { | |
salary = 200 + (0.09 * sales); | |
printf("Salary is: %.2f$\n\n",salary); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment