1 / 5

פתרון בוחן הכיתה

פתרון בוחן הכיתה. שאלה #1. Module Module1 Sub Main() Dim x, z As Integer x = Console.ReadLine() z = Console.ReadLine() If (x = 0) Then Console.WriteLine("Error") Else

damita
Download Presentation

פתרון בוחן הכיתה

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. פתרון בוחן הכיתה

  2. שאלה #1 Module Module1 Sub Main() Dim x, z As Integer x = Console.ReadLine() z = Console.ReadLine() If (x = 0) Then Console.WriteLine("Error") Else Console.WriteLine("Y is " & (40 * x * x * x - 4 * z * z) / (2 * x)) End If End Sub End Module

  3. שאלה #2 Module Module1 Sub Main() Dim count As Integer = 0 Dim temp, i As Integer For i = 1 To 1000 temp = Console.ReadLine() If (temp Mod 10 = 0) Then count += 1 End If Next Console.WriteLine("There were " & count & " times ") End Sub End Module

  4. שאלה #3 Module Module1 Sub Main() Dim i, j, width, height As Integer Console.WriteLine("Please enter height") height = Console.ReadLine() Console.WriteLine("Please enter width") width = Console.ReadLine() For i = 1 To height For j = 1 To width Console.Write("*") Next Console.WriteLine() Next End Sub End Module

  5. שאלה #4 Module Module1 Sub Main() Dim count As Integer = 0 Dim temp As Integer = 1 While (temp > 0) temp = Console.ReadLine() If (temp > 50) Then count += 1 End If If (temp < 50 And temp >= 0) Then count -= 1 End If End While Console.WriteLine("The number is " & count) End Sub End Module

More Related