using system Class Ex Div static void Main

  • Slides: 6
Download presentation

– • ﻣﺜﺎﻝ using system; Class Ex. Div { static void Main() { int

– • ﻣﺜﺎﻝ using system; Class Ex. Div { static void Main() { int x, a; double y, z; a=int. Parse(Console. Read. Line()); y= a / (double) 3; x = a / 3; Console. Write. Line( " x= {0} y= {1} " , x, y); z = a / 3. 0 ; Console. Write. Line( " z= {0: f 2} " , z); } } : ﺍﻟﻤﺨﺮﺝ ﺍﻟﻨﺎﺗﺞ 10 x=3 y= 3. 33333 z= 3. 33

: ﺍﻟﺒﺮﻧﺎﻣﺞ ﺍﻟﻜﺎﻣﻞ ﻟﻠﻤﺴﺄﻠﺔ using System; class Ex { static void Main() { int

: ﺍﻟﺒﺮﻧﺎﻣﺞ ﺍﻟﻜﺎﻣﻞ ﻟﻠﻤﺴﺄﻠﺔ using System; class Ex { static void Main() { int All. Price; double Price_Paid, One_Install. Ment; Console. Write("Enter the all price: "); All. Price = int. Parse(Console. Read. Line()); Price_Paid = All. Price / (double) 2; One_Install. Ment = (All. Price – Price_Paid) / (double) 5 ; Console. Write. Line("The price is paid is: {0}", Price_Paid); Console. Write. Line(“Every one installment is: {0}", One_Install. Ment); } }