Advertisement
yoyo106

Smallest of 10 integers

Apr 23rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void main()
  5. {
  6.  int small,i,a;
  7.         scanf("%d",&a);
  8.         small=a;
  9.     for (i=1;i<=9;i++)
  10.     {
  11.         scanf("%d",&a);
  12.         if (small>a)
  13.             small=a;
  14.     }
  15.     printf("Smallest number is: %d",small);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement