C Saved Program: placid-city

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


class sample class
{
int counter=1;
void display()
{
cout >>“ counter = “+counter;
}
Public static void main(string [] args)
{
s.display();
}

  Public  class sample class
{
Int counter=1;
Scanner sc=new scanner(system.in);
Public void display()
{
System.out.println(“ counter = “+counter);
}
Public static void main(string [] args)
{
Sample class s=new sample class;
s.display();
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs