দুটি সংখ্যার যোগফল ও গড় নির্ণয়ের জন্য সি ভাষায় প্রোগ্রাম।








#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,sum,avg;
clrscr();
printf("Enter the  first number:");
scanf("%d",&x);
printf("Enter the second number:");
scanf("%d",&y);
sum=x+y;
avg=sum/2;
printf("sum=%d\n",sum);
printf("avg=%d\n",avg)
getch();
}


Output:

Enter the first number: 8
Enter the second number: 2
Sum=10
Avg=5

Copy This Code:


Comments

Popular posts from this blog

তিনটি সংখ্যা থেকে বড় সংখ্যা নির্ণয়ের এলগরিদম ও ফ্লোচার্ট

একটি ত্রিভুজের ক্ষেত্রফল নির্ণয়ের জন্য সি ভাষায় প্রোগ্রামিং