Advertisement
vim_fans

Untitled

Oct 10th, 2021
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1.  
  2. int main() {
  3.  
  4.   int v[5] = {};
  5.   int i = 0;
  6.   int c = 0;
  7.   printf("Please enter 5 integers:\n");
  8.   while (scanf("%d", &c) != 1) {
  9.     v[i] = c;
  10.     ++i;
  11.   }
  12.   for(int j=0;j<5;j++)
  13.       printf("%d",v[j]);
  14.     //int result = binsearch(9, v, 5);
  15.     //printf("result= %d", result);
  16.   return 1;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement