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

( موضوع مغلق ) كيف أحول هذا البرنامج من لغة C الى لغة ال Assemply ؟

مغلق
بدأه Ekhlass في 29 مايو 2014 · 1 رد · 1,821 مشاهدة · في لغة Assembly لأنظمة 16, 32, 64 بت
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع
In this assignment, you need to code a simple guessing game using MIPS assembly language. 
The game starts by randomly picking a number between 10-99 then asks the user to guess the 
exact number. The user should guess a number and enter it. The program should tell the user if 
the entered number is greater or less than the picked number. The game continues until the user 
guesses the number correctly, at that point, a score indicating the number of trials it took the user 
to guess the number should be printed on the screen. 
 
 
 
This is code in C program
 
 
int input_value = 0;
int selected_values =0;
int score = 0;
 
 
 
int main() {
 
srand(time (null));
selected_value =rand()%90 +10
printf("I an Thinking of a number between 10-99. Can you guess what it is? \n");
 
while(input_value != selected_value){
 
scanf("%d",input_value);
 
if (input_value< selected_value && input_value <99 && inputvalue>10);
printf("\nNO, the number I am thinking of is higher than %i. Can you guess what it is ?"\n, input_value);
 
else if (input_value > selected_value && input_value <99 && inputvalue>10)
printf("\nNO, the number I am thinking of is lower than %i. Can you guess what it is ?\n",input_value);
 
 
else if ( inputvalue<=10);
printf("You number is too small ! choose another number")
 
else if (input_value>= 99)
printf("You number is too big! choose another number")
 
else{ printf("\n well done the answer is %i and your score is %i",input_value,score);
return 0;
}
 
score = score +1
 
}
return 0,
}
#2

اخي الكريم

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

حرصا منا على عدم اثارة البلبة والمشاكل في المنتدى فإننا قمنا بغلق موضوعك لأنه سوف يتسبب بخلق مشاكل انت في غنى عنها

مع خالص شكرنا وتقديرنا لك

ادارة منتديات الفريق العربي للبرمجه

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

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

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

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

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

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