Advertisement
mehedi2022

New_cook

Sep 10th, 2022 (edited)
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.90 KB | None | 0 0
  1. // cooking recipe for beef steak
  2. def favRecipe:Unit = (args: Array[String])
  3. {
  4.   var temp= 350    // for Rare/medium Rare/well cooked steak it may change that's why its var
  5.   var time= 6.0      //for Rare/medium Rare/well cooked steak it may change that's why its var
  6.   var s1= "Beef steak (well cooked) recipe : "
  7.   val s2= " Wash and soak the beef."
  8.   val s3= " Add salt and pepper."
  9.   val s4= " Place the beef in oven, set at "
  10.   val s5= " Take out from oven & serve."
  11.   val result = (s1 + s2 + s3 + s4 + s" $temp deg F and $time mins." + s5)
  12.   println(result)
  13.  
  14.   temp= 400
  15.   time= 4.0
  16.   s1= "Beef steak (Medium Rare) recipe : "
  17.   val(result2) = (s1 + s2 + s3 + s4 + s" $temp deg F and $time mins." + s5)
  18.   println(result2)
  19.  
  20.   time= 2.5
  21.   s1= "Beef steak (Rare Cooked) recipe : "
  22.   val(result3) = (s1 + s2 + s3 + s4 + s" $temp deg F and $time mins." + s5)
  23.   println(result3)
  24. }
  25.  
  26. favRecipe
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement