الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

رجاء خاص من المبرمجين(ساعدونا ارجوكم انا في مشكله)

مغلق
بدأه صقر العرب في 24 مايو 2002 · 1 رد · 349 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمه الله وبركاته

اخواني ارجوكم ساعدونا في حل هذة الاسئله اخوكم احتار مرة معاها

1-a simple program for declaring an array of 8 bytes and compute their

avrage and sum?

2-a simple program for declaring an array of 32 bytes and compute their

avrage and sum?

3-a simple program for declaring an array of 32 bytes,filling them with

K.B. reading and compute their avrage and sum?

4-a simple program for declaring an array of 32 bytes,filling

them with K.B. reading and compute their Max. & Min. and then print them?

5-write down a subprogram which uses the DOS interrupt 21h services and

uses the appropriate service to get and display the minutes and seconds

of the current time from the PC?

مع شكري لكم وجزاكم الله الف خير

اخوكم الصقر

#2

السلام عليكم

هذا حل السؤال الاول:

#include
#include
main()
{
 int array[8]={1,2,5,6,3,9,8,7},sum=0;
 double avg;
 for(int i=0;i<8;i++)
   sum+=array;
 avg=sum/8;
 printf("The sum is : %d , the avarege is : %0.2fn",sum,avg);
 getch();
{

وهذا حل السؤال الرابع

#include
#include

main()
{
  int array[32],sum=0;
  double avg;
  for(int i;i<32;i++)
  {
    printf("enter the %d element: ",i+1);
    scanf("%d",&array);
  }
  int min=array[0],max=array[0];
  for(int i=1;i<32;i++)
  {
    if(array>max)
     max=array;
    if(array     min=array;
  }
  printf("The maximum is : %d , the minimum is : %dn" , max,min);
  getch();
}

ها السؤالين اهم سؤالين افهمهم وحاول تحل الباقي

اما السؤال الاخير ما فهمته:confused:

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…