Posted by: prankster March 2, 2011
Login in to Rate this Post:
0
?
Awesome, now we have solutions on C, C# and Java.
Few questions,
@kalo_chasma:
Do we really need following imports(in java term)? All of them?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Will it be better to write
for (int i = a; i <= b; i++)
{
Console.Write("\t" + i);
}
Console.WriteLine();
I tried for (int i = a; i <= b; i++) but looks like codepad C doesnt support it, or may be C doesnt support it.
@Ayus,
We can for sure do
for (int i = a; i <=b; i++) in java right?
Also isn't it better to use String.format() in java?
why are all those " " + " " , is it even necessary?
Just few comments.
Few questions,
@kalo_chasma:
Do we really need following imports(in java term)? All of them?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Will it be better to write
for (int i = a; i <= b; i++)
{
Console.Write("\t" + i);
}
Console.WriteLine();
I tried for (int i = a; i <= b; i++) but looks like codepad C doesnt support it, or may be C doesnt support it.
@Ayus,
We can for sure do
for (int i = a; i <=b; i++) in java right?
Also isn't it better to use String.format() in java?
why are all those " " + " " , is it even necessary?
Just few comments.