C Basic 30: Variable

4 January 2020, 11:04 pm by antelove19

C programming language

C programming language



Happy Coding


main.c

/* ------------------------------------------------------------ */
/*  Variable                                                    */
/*  Using Variables with various of type data                   */
/*                                                              */
/*  Author: antelove                                            */
/*  Website: antelove.com                                       */
/* ------------------------------------------------------------ */

#include <stdio.h> // standar input output library

int main() {

    char myChar     = 'a';
    int myInt       = 10;
    float myFloat   = 10.010f;
    float myDouble  = 20.020;

    printf("This is using char: %c \n", myChar);
    printf("This is using integer: %d \n", myInt);
    printf("This is using float: %f \n", myFloat);
    printf("This is using double: %f \n", myDouble);

    getchar(); // hold the screen

    return 0;

}

Thank for reading :)


Keywords:


No Action Title
1 Live
2 Editor
0 comment