sum the numbers using union and structures


Kamachi decided to write one program in which she has to get one values using structure concept and another values using union concept, the result should add both values.Help to her to write code. Input Method Integer ranges from 1 to 999 Output Method sum of values Test Case 1 Input (stdin) 3 4 Expected Output 7 Test Case 2 Input (stdin) 5 6 Expected Output 11

Program :

#include <stdio.h>
struct sum
  int a,b;
int main()
  int c;
  scanf("%d %d",&s.a,&s.b);

 return 0;