fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. float number, percentage, result;
  5.  
  6. // Input the number
  7. printf("Enter Trade Price: ");
  8. scanf("%f", &number);
  9.  
  10. // Percentage to add
  11. percentage = 17.648;
  12.  
  13. // Calculate the result
  14. result = number + (percentage / 100) * number;
  15.  
  16. // Output the result
  17. printf("Retail Price is %.3f\n", result);
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
Enter Trade Price: Retail Price is 0.000