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
CSelection Structures : Values Swap
<03.06>
/* the switching program */ #include <stdio.h> int main (void) { int x, y, temp; /* Enter the two numbers */ printf("Enter the two numbers > "); scanf("%d %d", &x, &y); /* switch if x is larger than y */ if (x > y) { temp = x; x = y; y = temp; } printf ("x is %d and y is %d. \n", x, y); return (0); }
Hergestellt in Deutschland / Made in Germany
Enter two numbers > 88 45 x is 45 and y is 88.
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland