11:33 PM Max and Min value |
#include"stdio.h"
main() { int val, max, min, i; printf("enter value 1 : "); scanf("%d", &val); max=val; for(i=2;i<=5;i++){ printf("enter value %d : ", i); scanf("%d", &val); if(val>max){ max=val; } else if(val<min){ min=val; } } printf("max value = %d ,, min value = %d", max, min); getch(); } |
|
Total comments: 0 | |