program in c to print 1 to 100 without using loop

Answer Posted / darshana

Sub Main()
Dim i, j As Integer
Console.WriteLine("enter i numbers")
i = Console.ReadLine()

Console.WriteLine("enter j numbers")
j = Console.ReadLine()
Console.WriteLine()
new1(i, j)

End Sub

Sub new1(ByVal i As Integer, ByVal j As Integer)

Dim num As Integer = i

If num > j Then
Console.WriteLine("end")
Else


Console.WriteLine(num)
num = num + 1
new1(num, j)
End If



End Sub

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can the size of an array be declared at runtime?

614


Why cant I open a file by its explicit path?

595


What is header file in c?

607


What are keywords in c with examples?

608


How do you do dynamic memory allocation in C applications?

634






the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

609


Is c procedural or object oriented?

585


What is floating point constants?

695


Define circular linked list.

573


What is the difference between a function and a method in c?

565


What does double pointer mean in c?

584


Differentiate between a structure and a union.

770


What is 2 d array in c?

562


How can I handle floating-point exceptions gracefully?

636


What are the different types of control structures in programming?

660