IHYPRESS PROGRAMMING
Tutorials and C programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
COverview of C : printf and scanf
<01.02>
/* Trying printf and scanf */
#include <stdio.h> int main (void) { /* declarations */ double x, y, z; /* executable statements */ printf ("Enter two real numbers: "); scanf ("%lf %lf", &x, &y); z = x + y; printf ("\nThe sum of %lf and %lf is %lf.\n", x, y, z); printf ("\nThe product of %lf and %lf is %lf.\n", x, y, x*y); return (0); }
Hergestellt in Deutschland / Made in Germany
Enter two real numbers: 45.9 432.457 The sum of 45.900000 and 432.457000 is 478.357000. The product of 45.900000 and 432.457000 is 19849.776300.
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland