مشاهدة النسخة كاملة : برنامج بسيط بالفجوال بيزك
عابر سـبيل
11-01-2005, 10:32 PM
اعرف انى اثقلت عليكم كتيرا بطلباتى ولكن ...
كيف استطع ان أصمم برنامج أدخل فيه مجموعة من الاسماء ثم اضغط على زر يختار اسم من بين مجموعة الاسماء عشوائياً ومع كل تغطة يتغير الاسم.
ولكم جزيل الشكر ووافر الاحترام ... :cool:
infitar
11-01-2005, 11:45 PM
use the Random class to select a random name...
specify the range of random numbers to generate...
ibn_alqalam
12-01-2005, 05:21 AM
#include <stdio.h>
#include <stdlib.h>
int main ()
{
char input;
char *names [] = {"Saleh", "Ali", "Fatima",
"Talal", "Layla", "Yuhanna",
"Ramsis", "Hekmat", "Mustafa"};
puts ("Press Enter to for more names, or 'q' to quit");
input = getchar ();
while (input != 'Q' && input != 'q') {
printf ("%s\n", names[ rand() % 8]);
input = getchar ();
}
}
Dear عابر سـبيل,
Download the program please to see what you want...
The idea is that you add several names to a listbox and then click on a button then it will choose a name from the listbox randomly...
Best regards
Firas S Assaad
http://m.1asphost.com/islamclub/
عابر سـبيل
13-01-2005, 02:12 PM
شكرا جدا على حل استفسارى وانا أخجل أنا معظم مشاركاتى بهذا المنتدى هى اسئلة ...:31:
جميع حقوق برمجة vBulletin محفوظة ©2025 ,لدى مؤسسة Jelsoft المحدودة.
جميع المواضيع و المشاركات المطروحة من الاعضاء لا تعبر بالضرورة عن رأي أصحاب شبكة المنتدى .