Every single programming language has its way of beginning or writing the first code. It is exciting to dive into them individually to discover the greatest explorations. In this practical article, you will learn about the first best codes for the 3 languages, such as JavaScript, Java and C++.
USING CODE EDITOR
JAVASCRIPT
1 console.log("Learning to code and build programs in JavaScript for the first time"); 2 Press the enter key after the first line of code has been fed 3 Go to the three dots up there, located in the right-hand corner of the CODE EDITOR 4 Tap on it 5 From the drop-down list or menu, select and tap on EXECUTE 6 Choose or make an option concerning the language you want to compile in, in this case, we will have to select JAVASCRIPT 7 Automatically, the compiler will also be selected 8 Tap on RUN or EXECUTE 9 Wait till the program gives you the output
NOTE:
You will never get the output correctly when the wrong command is fed. Example, in step 1.
RUNNING FIRST CODE IN JAVA
JAVA
1 Load the CODE EDITOR and perform the below steps 2 public class Main { 3 public static void main(String[ ] args) { 4 Sysem.out.println("Learning to code and build programs in Java for the first time"); 5 } 6 }
HOW TO RUN THE CODE
- Click on the execute button from the main menu
- Select the language, that is Java
- Make sure you select the compiler if not selected
- Click finally on Execute again or Run
C++ – First Code
1 #include<stdio.h> 2 int main ( ) { 3 printf("Learning to code and build programs in C++/C for the first time") 4 return 0; 5 }
HOW TO RUN THE CODE
- From the main menu, click on the execute button in CODE EDITOR
- Select C++ as the language
- Automatically, the compiler will be selected
- Click on Run again
Congratulations!!!
About Author
Discover more from SURFCLOUD TECHNOLOGY
Subscribe to get the latest posts sent to your email.