اذهب إلى المحتوى
  • -1

المطلوب إنشاء مشروعا برمجيا باستخدام السي شارب يقرا المستخدم المقاس (UK) ويحوله إلى مايقابله(France) أو (Italy) حسب اختيار المستخدم

درويش

السؤال

Recommended Posts

  • 0

أهلا بك،

يمكنك فعل ذلك من خلال البرنامج البسيط التالي 

using System;
					
public class Program
{
	public static void Main()
	{
	   Console.WriteLine("Type the UK:  "); 
       int  UK = int.Parse(Console.ReadLine());
	   Console.WriteLine("Enter 1 to change the UK into France_size or Enter 2 to change the UK into Italy_size "); 
	   int  choise = int.Parse(Console.ReadLine());
		
	   int result=0;
		
		if(choise!=1 && choise!=2)
			Console.WriteLine("you allow to choose between 1 and 2 only!!");
		
		if(choise==1) 
			result=UK+26;
		if(choise==2) 
			result=UK+30;
		
		Console.WriteLine(result);
		
	}
}

بالتوفيق..

رابط هذا التعليق
شارك على الشبكات الإجتماعية

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...