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
What is the data segment that is followed by c?
Where can I get an ansi-compatible lint?
Describe the header file and its usage in c programming?
How does selection sort work in c?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What are the types of i/o functions?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
Is that possible to add pointers to each other?
how do you execute a c program in unix.
What is function pointer c?
What are valid signatures for the Main function?
Difference between Function to pointer and pointer to function
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
Can we initialize extern variable in c?
How are pointers declared in c?