So I'm a highschool student in CMPT Programming 1. The assignment is: Write a program to print the value of a series of numbers from 0-9 in descending order. Now the lesson gives me information on the "for statement", "while statement", and the "do-while statement". It gives these examples:
For statement code
Module Module1 ' Sub Main() For i As Integer = 0 to 10 step 1 System.Console.Writeline(i) Next i End Sub End Module
Dim i As Integer = 0 While i < 50 System.Console.Writeline(i) i = i + 10 End While
Module Module 1 Sub Main() Dim x as Integer Do System.Console.WriteLine(x) x = x + 1 Loop While x < 10 End Sub End Module
These are the examples for my lesson. So how do I write a value of a series of numbers from 0-9 in descending order. It also gives me the If-then, If-Then Else, and Switch Statements code if that's helpful.