For(int I = 0: I < 5; i++)
{
System.out.println(" print this " + I );
}
i'll take a stab at it, though i'm a java person.. #include<stdio.h> main() { for (int i = 1; i<9;){ printf(i); i*=-1; if(i<0) i-=2; else i+=2; } }
A 40 cm piece of string can be cut into eight 5 cm pieces.
You can cut the string into 15 total pieces.
390625
5 times 5 times 5
look at the print
if x%5==0 { System.out.println("@"'); }
If you refering to Object then String[] something=new String[2]; Here you have to remember that something only allocated space for 2 String object but it did not created them yet. By default Objects are intantiated to null so if you try to print the content of an array System.out.println(something[0]);//print null System.out.println(something[0].toLowerCase()); Throws NullPointerException Couple other ways to create Arrays In java String[] something=new String[]{"Me","You"}; String[] something={"Me", "You"};
All of the Java number classes have a parse[type] method, like parseInt() in Integer or parseDouble() in Double that convert Strings to primitive numbers. String s = getInput(); int var = Integer.parseInt(s);
That really depends on the programming language. In Java, it is sufficient to concatenate it with a String: int myNumber = 5; result = "" + myNumber; Other languages may require a special function, or method, to convert from integer to string.
C# 5 times, then D# 5 times, then G# 4 times, and then, depending on which part of the song, it's F on the D string 5 times or F on the C string 5 times. Happy Viva la Viding!! ;-)
5 times 3
System.out.println("2, 3, 5, 7"); There are so few you dont need to calculate it
You can do this with a nested loop: public static void main(String[] args){ for(int i=5, i>0, i--){ for(int j=i, j>0; j--) System.out.print(i); System.out.print(' '); } } The outer loop decrements the integer that you are printing and the inner loop will print the integer the number of times equal to its value.
Cls Dim n as string Dim b as string b="Kamal" For a=5 to 1 step -1 n=left$(b, a) Print n Next a End
12345 1234 123 12 1
The latest version of java is called Java 5 or Tiger.