Download small basic

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Using small basic write a program to display kid on the screen in case the age is less than 16, and display adult in
case the age is greater than 16
TextWindow.WriteLine("enter the age")
age = TextWindow.ReadNumber()
If age <=16 Then
TextWindow.WriteLine("young")
Else
TextWindow.WriteLine("adult")
EndIf
Using small basic write a program to insert the marks of Arabic English and computer for a student and calculate
the average then display on the screen success in case the average is greater than or equal 50 or display fail in
case the average is less than 50
TextWindow.WriteLine("enter arabic mark")
arabic= TextWindow.ReadNumber()
TextWindow.WriteLine("enter english mark")
english= TextWindow.ReadNumber()
TextWindow.WriteLine("enter computer mark")
computer= TextWindow.ReadNumber()
avg= (computer + english + computer) / 3
If avg >= 50 Then
TextWindow.WriteLine("success")Else
TextWindow.WriteLine("fail")
EndIf
Using small basic write a program to display your name on the screen 10 times
For i= 1 To 10
TextWindow.WriteLine("your name")
EndFor
Using small basic write a program to find the sum of 10 numbers and display the result on the screen
sum= 0
For i= 1 To 10
sum= sum + i
EndFor
TextWindow.WriteLine("the sum is " + sum)