مشاهدة النسخة كاملة : please I need some help
crystal moon
02-02-2004, 08:36 AM
Hi everyone;
I'm a new member in this lovely forum and I am really in need
for your help:
I'm a freshman at the programing department and I'v found a problem in
solving the following question:
-Write a program to insert ten numbers and type the largest one and the
smallest one.
Well, my problem that I don't know how to make the program type the
smallest number.
THE HAWK
02-02-2004, 01:00 PM
بأي لغة برمجة تريد ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
crystal moon
02-02-2004, 02:21 PM
,oh
Iam sorry I 'v forgot
++the programing language is c
thanks alot for your consideration
hzoma1
02-02-2004, 02:35 PM
first of all there is a quistyion which i would like to ask you if you want to use functions or not
if you won't iw ill tell you but if you want with functions tell me and i will give you the soluitin
first you have to make an array of any number kind
then you have to make aloop to entering the numbers
then make another loop to test ther largest one (here you have to define another array of the same kiond and the same size (call it temp[the array size]) to know the largest and the smallest)
when you finish the test you will print the (temp[0]) and the smallest one will be the last temp
if you need the program written in txt file tell me and i will do it but i did not write it now for letting you to make it by your self;) ;) ;) :biggthump :biggthump :biggthump :ciao: :ciao: :ciao:
crystal moon
02-02-2004, 08:14 PM
Hi there
first of all i wanna say thanks alot
for answering my question
and i hope that you can tell me how can i
write the program using the function
smallprogrammer
03-02-2004, 09:51 PM
إليك هذا البرنامج بلغة c وما عليك إلا تعديل جمل الادخال والاخراج حسب عبارات ++c
مع تمنياتي بالتوفيق
#include<stdio.h>
#define N 10
main
{
int a[N],i,R,S;
for (i=1;i<=N;i++)
{
printf(''Enter value no.:%d'',i);
scanf(''%d'',&a[i]);
}
for (i=1;i<=N;i++)
{
R=a[i];
if R<a[i+1] then R=a[i+1];
}
printf('' The largest value is:%d'',R);
for (i=1;i<=N;i++)
{
S=a[i];
if S>a[i+1] then S=a[i+1];
}
printf('' The smallest value is:%d'',S);
}
crystal moon
04-02-2004, 01:15 AM
Hi there
;thank you very much for your help
. I'm so grateful
hzoma1
05-02-2004, 07:10 PM
if you want to know the program by the funcion way here you are
you will declare afunction and pass an int array and returnan int type (for the largest on) and this function will be for the bigges one and also declare a function and pass an arrya in type and return an int type for the smallest one
an ieach function you will declare another in array type for the testing then in the first function (the largest one be the last array) the second function()for the smallest one you have to define another array tpe for the testing then the smallest one will be th first one and thats all
any way if you need more help plz send me and i will be there
hzoma1
05-02-2004, 07:11 PM
:biggthump :biggthump :biggthump if you want to know the program by the funcion way here you are
you will declare afunction and pass an int array and returnan int type (for the largest on) and this function will be for the bigges one and also declare a function and pass an arrya in type and return an int type for the smallest one
an ieach function you will declare another in array type for the testing then in the first function (the largest one be the last array) the second function()for the smallest one you have to define another array tpe for the testing then the smallest one will be th first one and thats all
any way if you need more help plz send me and i will be there
smallprogrammer
05-02-2004, 07:33 PM
يا عزيزي بعد ما كتبت البرنامج بالصورة المثالية
تمت إزاحة الأقواس لبداية بعض السطر بصورة تلقائية من
مركز التحكم بالمنتدى لذلك فقط انقل الأقواس والفاصلة المنقوطة
إلى نهاية السطر التي حدث بها خلل
وتقبل تحياتي
crystal moon
06-02-2004, 12:20 AM
Hello there
thank you very much for all the help you've gave me
and I'm sooooooooo grateful
smallprogrammer
06-02-2004, 04:42 PM
ولا يهمك ... مبرووووووك
crystal moon
07-02-2004, 12:49 PM
Hi again
well I need anthor favour from you
do you know from any website I can download good books of C++ like
(C++how to program )
?or any other good books
I'm waiting for your answer
يالطيف الطف
08-02-2004, 03:06 AM
لكتابة اوامر البرامج استخدمو امر الكود
(test)
موجود عن الرد على شكل رمز رقم الهاتف
طبعا هذا الامر لتحاشي مشكلة ان المنتدى يزيح الاقواس لانه عربي!
يالطيف الطف
08-02-2004, 03:11 AM
#include<stdio.h>
#define N 10
main
{
int a[N],i,R,S;
for (i=1;i<=N;i++)
{
printf(''Enter value no.:%d'',i);
scanf(''%d'',&a[i]);
}
for (i=1;i<=N;i++)
{
R=a[i];
if R<a[i+1] then R=a[i+1];
}
printf('' The largest value is:%d'',R);
for (i=1;i<=N;i++)
{
S=a[i];
if S>a[i+1] then S=a[i+1];
}
printf('' The smallest value is:%d'',S);
}
اعتقد البرنامج الان صح :)
hzoma1
08-02-2004, 04:26 PM
if you want a book for c++ here is a web site for books in any programming language i like it
http://www.freeprogrammingresources.com/
any help iam here:biggthump :biggthump :biggthump :biggthump :ciao: :ciao: :ciao:
crystal moon
10-02-2004, 12:24 AM
It's really a very good website
Thank you very much
hzoma1
11-02-2004, 03:48 AM
if you want more i have but what you want exactly you can search for it on google and you will find what i have
you know what i mean
any way if you need help i am here
crystal moon
11-02-2004, 11:47 PM
Well, thank you very very much
for your help, I'm so grateful
جميع حقوق برمجة vBulletin محفوظة ©2025 ,لدى مؤسسة Jelsoft المحدودة.
جميع المواضيع و المشاركات المطروحة من الاعضاء لا تعبر بالضرورة عن رأي أصحاب شبكة المنتدى .