Sum of natural no.
Question-1:-Wap a program to print the sum of two natural numbers?
Answer:-
#include<stdio.h>#include<conio.h>void main(){int a,b,c;clrscr();printf("enter two no.:\n");scanf("%d%d",&a,&b);c=a+b;printf("sum=%d",c);getch();
}
NOTE-Their are some other methods to solve this qustion. If you want other methods then comment on this question.
Comments
Post a Comment