Computer Science, asked by rayhansaifi011, 14 hours ago

tell this program
please donot spam i will reprt you ​

Attachments:

Answers

Answered by purveshKolhe
6

\huge{\red{\overbrace{\underbrace{\purple{\mathfrak{Answer::}}}}}}

\blue{\underline{\bf{Java-}}}

public class Main { // Class name is 'Main'

  public static void main(String [] args) { // Main method

     int x = 1; // variable x is declared and initialized value 1 to it

     while(x <= 10) { // while loop

        System.out.println(x); // method for printing

        x++; // increment operator

     }

  }

}

\blue{\underline{\bf{C \:Sharp-}}}

using System; // System is included

namespace Hey{ // namespace 'hey' is declared

  class Hi {  // name of class is 'hi'

      static void Main(string[] args)  { // Main method  

          int x = 1; // variable x is declared and initialized value 1 to it

          while(x <= 10) { // while loop

          Console.WriteLine(x); // method for printing

          x++; // increment operator

          }

      }

  }

}

\blue{\underline{\bf{Python-}}}

x = 1 #variable declared and initialized.

while x < 10: #while loop

  print(x) # method for printing

  x+=1 #increment operator

\blue{\underline{\bf{Cpp-}}}

#include <iostream> // iostream header file is included

using namespace std; // standard namespace is used

int main() { // Main method

  int x = 1; // variable x is declared and initialized value 1 to it

  while(x <= 10) { // while loop

  cout << x; // method for printing text

  x++; // increment operator

  return 0; // required to end main method

}

Hope it helps...

Similar questions