fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. float oldPrice;
  5. printf("Добрый день\nВведите старую цену.");
  6. scanf("%F", &oldPrice);
  7. printf("Вы ввели такую старую цену - %f грн. Спасибо:)", oldPrice);
  8. float newPrice;
  9. printf("Добрый день\nВведите новою цену.");
  10. scanf("%F", &oldPrice);
  11. printf("Вы ввели такую новою цену - %f грн. Спасибо:)", newPrice);
  12. float diffPrice = newPrice - oldPrice
  13. printf("Разница в цене товара = %F грн", diffPrice)
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:13:5: error: expected ‘,’ or ‘;’ before ‘printf’
     printf("Разница в цене товара = %F грн", diffPrice)
     ^~~~~~
prog.c:12:11: warning: unused variable ‘diffPrice’ [-Wunused-variable]
     float diffPrice = newPrice - oldPrice
           ^~~~~~~~~
stdout
Standard output is empty