C program to add two numbers using structure #include<stdio.h> #include<conio.h> struct sum { int a; int b; }; void main() { int sum1; struct sum s; clrscr(); printf(“Enter two numbers:”); scanf(“%d%d”,&s.a,&s.b); sum1=s.a+s.b; printf(“nSum=%d”,sum1); getch(); } You May Also Like:C++ program to add, subtract, multiply and divide two complex numbers using structuresC program that compare two given dates. To store a date use a structure that contains three members namely day, month and year. If dates are equal then display a message as EQUAL otherwise UNEQUALC program that reads a file containing integers and appends at its end the sum of all the integersC program to find the sum of the series x+x^2/2+x^3/3+…..+x^n/nC++ program to find the sum of the series x+x^2/2+x^3/3+…..+x^n/n +11 Tweet Share19 Share Pin StumbleShares 20

sarang_agarwal November 18, 2013 does this gives any advantage if we would have instead simply added using variables in the main itself>? Reply ↓

does this gives any advantage if we would have instead simply added using variables in the main itself>?