C - Write program to display the result of adding 456.98 and 213.4

Requirements

Write a program that displays the result of adding 456.98 and 213.4.

Hint

using the %f placeholder

both values are floating point, so the result is a float.

Demo

#include <stdio.h>

int main()/*from   www .j a  v a2 s .c  om*/
{
    printf("The result is %f\n",456.98+213.4);
    return(0);
}

Result

Related Quiz