을 얻을 부유물에서 c

코드 예제

4
0

c 떠

// create float and assign value
// print float value to console
#include <stdio.h>

int main()
{
    float pi = 3.14;
    float dollars;
    dollars = 32.27;

    printf("I have %f dollars", dollars);       
  
	// controls the number of numbers shown after the decimal point
    printf("\nI have %0.2f dollars", dollars); 
0
0

을 얻을 부유물에서 c

//get a float from user
//print float value to console
#include <stdio.h>


int main()
{
    //define a float variable
    float a;
    
    //print the prompt
    printf("Please enter a float number: ");
    
    //Actually getting the number
    scanf("%f", &a);
    
    printf("You have entered %f", a);

}

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................