0

I want to creat one input insted of two, but it give me to write two numbers!! and I don't know acutally what the problem in my code?!

#include <stdio.h>

int main(void)
{

    float regular;
    printf("Rgular price: ");
    scanf("%f\n", &regular);

    float sale = regular * .85;

    printf(" sale price = %.2f\n", sale);
    return 0;
}

the inputs :

enter image description here

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
LeGenD A
  • 1
  • 1
  • 3
    [Don't post images of text](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question). [Edit] your question to copy-paste the code *as text* into your question. – Some programmer dude Sep 19 '22 at 12:10
  • 1
    And don't tag completely unrelated languages or tags. Why did you add the C# language tag? Please take some time to read [the help pages](http://stackoverflow.com/help), take the SO [tour], read [ask], as well as [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/). – Some programmer dude Sep 19 '22 at 12:12

0 Answers0