Advertisement
Guest User

Untitled

a guest
Feb 10th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # include <stdio.h>
  2. int main()
  3. {
  4.     int a[5] = {10,17,-3,6,-12}, b[5] = {7,17,-1,-4,0}, c[5] , i;
  5.     for(i=0; i<5; i++)
  6.     {
  7.         if (a[i]>b[i]){
  8.             c[i]=a[i];
  9.         }
  10.         else if (b[i]>a[i]){
  11.             c[i]=b[i];
  12.         }
  13.         else {
  14.             c[i]=0;
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement