C/C++ programs(use of int,float and char)


##Here int--> integers, float-->decimal no., char--> character
to print this all we can use %d, %f and %s respectively

#include<stdio.h>
int main(){
    int a=4;
    float b=8.5;
    char c='u';
    printf("the value of a is %d\n", a);
    printf("the value of b is %f\n", b);
    printf("the value of c is %c\n", c);
    printf("sum of a and b is %f\n", a+b);

    return 0;
}


Comments

Popular posts from this blog

Site to calculate electricity bill using HTML, CSS and Java Script

Functions and recrusion.

Quick calculator using HTML,CSS and Java Script.