//WAP TO ADD TWO NUMBERS IN STRUCTURES
#include<stdio.h>
#include<conio.h>
struct abhi
{
int a;
int b;
float c;
}wad;
void main()
{
clrscr();
printf("\n\nENTER THE NO.'S:\n\n");
scanf("%d%d",&wad.a,&wad.b);
wad.c=(wad.a+wad.b);
printf("SUM OF THE TWO NUMBERS=%f",wad.c);
getch();
}
/***************************************************************************
OUTPUT
***************************************************************************
ENTER THE NO.'S:
1 2
SUM OF THE TWO NUMBERS=3.000000
*/
No comments:
Post a Comment