#include <stdio.h> float sum( float n1, float n2); int main() { float m, n, total; printf("Enter first number:"); scanf("%f", &m); printf("Enter second number:"); scanf("%f", &n); total=sum(m ,n); printf("The sum of the two numbers is %.2f", total); } float sum(float n1, float n2) { return (n1+n2); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter