To learn more about sorting algorithms, Please visit Learn Algorithms. All topics are well explained with examples and implementation in various languages like Python, Java, C++, C and C#.

rproffitt commented: 8 years late. That could be taken as spam. +0

The Java code should look like this:

``````import java.util.Scanner;
public class MyClass {
public static void main(String[] args)
{
//final int START = 5;
final int STOP = 500;
int NUMBER_PER_LINE = 10;
Scanner val = new Scanner(System.in);
int START =val.nextInt();
for(int i = START; i <= STOP; i +=START)
{
System.out.print(i + "  ");
if(i % NUMBER_PER_LINE == 0)
System.out.println();
val.close();
}
}
}``````

JamesCherrill commented: Rubbish. Still has the original bug! -3
rproffitt commented: Spam much? +0

Look like the C++ code is:

``````#include <iostream>
using namespace std;
int calculate(int values[], int size) {
for (int i =0; i< size; i +=1)
{
}
}

int main()
{
int myArray[5] = {0, 2, 4, 8, 16};
cout << "The answer is " << calculate(myArray, 5);
}``````

which can be converted into Python as below:

``````MyList = [0, 2, 4, 8, 16]
print(sum(MyList))``````

rproffitt commented: 9 years late. That could be taken as spam. -3

`
mark = input("Enter marks: ")

if mark >= 80:
print("A")
elif mark >= 70:
print("B")
elif mark >= 60:
print("C")
elif mark >= 50:
print("D")
else:
print("F")
`