Dear guys,
I get stuck in a basic problem that is often overlooked.
Like this , I can write code in such way.

#include"stdio.h"
void main(void){
    double x;
    scanf("%f",&x);
    printf("%f",x);
}

When I input a number like 3.0 ,however the result is a minus number.
I don't konw why ,anybody can help me?

this is "C" program and this is a worng please you cheack it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.