You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **C++** implementation is using a function named `isPrime` that takes a single parameter `num` representing the number the function is checking if it's a prime number or not. The function returns `True` if the number is **Prime**, otherwise it returns `False`.
54
+
55
+
The **Java** implementation is using a function named `isPrime` that takes a single parameter `num` representing the numer the function is checking if it's a prime number or not. The function returns `True` if the number is **Prime**, otherwise it returns `False`.
56
+
57
+
### Differences
58
+
59
+
1.**File Stucture**:
60
+
- In **C++**, you have the ability to create a header file to store libraries and function declorations. While Java has no such thing.
61
+
-**Java** forces you to work in a `Class` while, **C++** lets you work outside of `Classes`
62
+
63
+
2.**Syntax**:
64
+
- The syntax for printing to the console/output is a little different. **C++** uses `cout` while, **Java** uses `System.out.print();`
0 commit comments