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()//  www .  j a v a 2  s  .co  m
{
    printf("The result is %f\n",456.98+213.4);
    return(0);
}

Result

Related Quiz