what's the problem here

G

Ganesh

what's the problem here, i couldn't use more than one system.console



namespace Simple
{

using System;

class Class1

{

static void Main ( string[ ] args )

{

int i;

double sum;

float sum1;

String s;

sum =0;

int j;

s = "welcome to c#";

for(i=0;i<=10;i++)

{

sum += i;

}

Console.WriteLine (" %3.2f total sum is " + sum) ;

// s =console.readline();

// while ( j <=10)

// system.console.writeln(i++);


}

}

}



thanks
 
J

Jon Skeet [C# MVP]

Ganesh said:
what's the problem here, i couldn't use more than one system.console

What do you mean by you "couldn't use more than one system.console"?
The code you've got compiles and runs, although you seem a bit confused
about string formatting. The lines you've got commented out won't work
because C# is case-sensitive and you've got the case wrong. You've also
tried to call writeln which isn't a method which exists in the console
class - it's WriteLine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top