Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
Spring 2017 Project 2 v.02
//gcc 5.4.0 #include <stdio.h> Start Program: int numOne; int numTwo; int numThree; int v1=0; PRINT "Input 3 integers" READ numOne,numTwo,and numThree COMPUTE minumum numbers if(numOne<=numTwo&&numOne<=numThree) printf("%d is the minimum number",numOne); else if(numTwo<=numOne&&numTwo<=numThree) printf("%d is the minimum number",numTwo); else printf("%d is the minimum number",numThree); COMPUTE maximum numbers if(numOne>=numTwo&&numOne>=numThree) printf("%d is the maximum number",numOne); else if(numTwo>=numOne&&numTwo>=numThree) printf("%d is the maximum number",numTwo); else printf("%d is the maximum number",numThree); COMPUTE positive numbers printf("Positive Numbers:"); if(numOne>=v1) printf("%d,",numOne); if(numTwo>=v1) printf("%d,",numTwo); if(numThree>=v1) printf("%d\n",numThree); COMPUTE negative numbers printf("Negative Numbers:"); if(numOne<=v1) printf("%d,",numOne); if(numTwo<=v1) printf("%d,",numTwo); if(numThree<=v1) printf("%d\n",numThree); COMPUTE All Even Numbers printf("Even Numbers:"); if(numOne<=v1) printf("%d,",numOne); if(numTwo<=v1) printf("%d,",numTwo); if(numThree<=v1) printf("%d\n",numThree); COMPUTE All Odd Numbers COMPUTE All equal numbers SORT all numbers int main(void) { printf("Hello, world!\n"); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Switch
experimento con quicksort
add.c
level9
C Array Demonstration
20171117_FUNCIONES
NOT a String in C - 2
Check EOF Value
Atoi test
finalpyramid
Please log in to post a comment.