Input and Output with Floating-Point Numbers

#include <stdio.h>

int main() {
    // Input and output with floating-point numbers
    float floatNumber;

    printf("Enter a floating-point number: ");
    scanf("%f", &floatNumber);

    printf("You entered: %f\n", floatNumber);

    return 0;
}
chevron_left
chevron_right

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website