Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Float and Double Input/Output


#include <stdio.h>
int main()
{
    float num1;
    double num2;
    
    printf("Enter a number: ");
    scanf("%f", &num1);
    printf("Enter another number: ");
    scanf("%lf", &num2);
  
    printf("num1 = %f
", num1);
    printf("num2 = %lf", num2);
  
    return 0;
}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #Float #Double
ADD COMMENT
Topic
Name
8+5 =