Computer Science, asked by Ronald11, 1 year ago

WAP in java to print numbers till 100

Answers

Answered by anuj
0
heya friend,

this program is quite simple as we just have to run a loop till 100 in the condition



class PRINt
{
   public static void main()
     {
            for(int i=1;i<=100;i++)
              {
                   System.out.println(i);
                   }
              }
}
Answered by Anonymous
0
//This program is to print 100 numbers
Class Print_numbers
{
public void main( )
{
int i;
for(i=1;i<=100;i++)
{
System.out.println(i);
}
}
}


Anonymous: If u don't believe check once
Ronald11: checked
Ronald11: main() should always be there
Ronald11: as the execution starts from main()
Anonymous: ok its ur wish
Anonymous: what u believe u believe
Ronald11: it will show error like class interface or enum expected
Anonymous: no
Ronald11: yup
Ronald11: y not u edit ur answer and add image
Similar questions