expecting one argument insted of two ( scanf function ) - discount beignner project

Viewed 16

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

0 Answers
Related