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

c programming (help)

مغلق
بدأه abofares في 30 أبريل 2007 · 2 رد · 432 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

salam alekam brothers

1) Prompt for and then accept 10 floating point values from the

user.

2) Store these values in an array.

3) Pass the array to a procedure which prints out the values in

a numbered fashion (i.e like line numbers).

4) Pass the array to a function which returns the minimum value.

5) The returned minimum value is printed out along with a

suitable heading.

i did this

#include <stdio.h>

FILE * output =NULL;

FILE * input =NULL;

{int i;

float numbers;

FILE * output = stdout;

FILE * input = stdin;

maximum = numbers[0];

for (i=0;i<argc;i++)

fprintf(output,"please enter a data number:");

fscanf(input,"%f",numbers[0..9]);

if (argc > maximum)

fprintf(output,"the maximum number is %f",numbers);

}

if u know nothin please welcome me to the room

#2

فينكم ياشباب................................ارجوا المساعده ولكم كل خير!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!اخوكم ابوفراس

#3

بسم الله الرحمن الرحيم

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

اقتباس
1) Prompt for and then accept 10 floating point values from the

user

أفتح array حجمها 10 وب loop صغيرة أطلب من المستخدم يدخل القيم ف ال array

اقتباس
3) Pass the array to a procedure which prints out the values in

a numbered fashion (i.e like line numbers

خد الarray وأرميها لدالة

void print(int* array)
{
 for(int i =0 ; i < 2; i++)
  cout <<array;
}

اقتباس
4) Pass the array to a function which returns the minimum value

أول حاجة هتباصى الarray للدالة داخل الدالة عرف متغير inital value بتاعتة = 0 وبعد كدة بلوب وقارن هل قيمة المتغير أكبر من القيمة الموجود ف الarray ولا لأ لو اكبر حط القيمة بتاعت ال array فى المتغير اللى معرفة

وبعد كدة أعمل reutrn للمتغير دة

على ما فهمتة من أخر نقطة هتكون شبيهة برقم 4

Muhammad Allam

Computer Science

@Resource(MappedURL="My Blog" )

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

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