program to reverse the order of words in a string.
Answers were Sorted based on User's Feedback
Answer / hrushikesh
Public Class Form1
Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim str As String
Dim words As String()
str = TextBox1.Text
words = Split(str)
Label1.Text = String.Empty
For i As Integer = words.Length - 1 To 0
Step -1
Label1.Text += words(i) + " "
Next
End Sub
Is This Answer Correct ? | 4 Yes | 7 No |
Answer / snehu
import java.io.*;
import java.lang.*;
public class StringReverse
{
public static void main(String[] args)throws Exception
{
String words = "hi frends........ welcome to my
world";
String reverse = new StringBuffer(words).reverse
().toString();
System.out.println("Normal : " + words);
System.out.println("Reverse: " + reverse);
}
}
Is This Answer Correct ? | 3 Yes | 12 No |
Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long
Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.
program for straight line(y=mx+c)
program for string reverse(eg:- i am boy -> boy am i)
8 Answers Black Pepper, Infosys, Mind Tree,
program for addition of fraction(M/N + P/Q = Y/Z)
c# coding for a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors not using the Big-integer and Exponential Function's.
How to Link Different Data Sources Together?
Code for Searching for Multiple Matches with the MatchCollection Class?
Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.
IS Array list is generic or non generic
How to Create Files by Using the FileInfo Class?
"c sharp" code for factorial using static variables