I want to find the smallest number from the numbers in an array entered by the user. The output I am getting for the program is a vague number -858993460. This is generally because of a type mismatch but they seem alright here. Not able to think of a solution. Thanks for the help!
``` // #include<stdio.h> int main() { int a; int i; int num[25]; printf("Enter the 25 numbers:"); for (i = 0; i <= 24; i++) { scanf("%d", &num[i]); } for (i = 0; i <= 24; i++) { a = num[i]; if (a < num[i+1]) { a = a; } else a = num[i+1]; } printf("Lowest number is %d\n", a); return 0; }
by JP0605 in StackOverflow on 2022-06-05 . Answer Hope this will work for you. Jus...