From what I could make out of your question, I took your code made it compile and modified it:
public class test
{
public static void functionC(int n)
{
for(int i = 0; i < n; i++)
{
System.out.println("Hello world");
}
}
public static void main(String[] args){
functionC(5);
}
}
This would be functionC. For the other functions you need to modify the argument “n” within each method in order to achieve the correct result (raise to power etc.).
I will echo what Azurefrog mentioned:
You need to read up on the basics of the Java syntax because your code had a lot of errors and did not compile. Some of the errors: for loop, declaration of methods and classes, locality of arguments.
1
solved Java loops with math symbols [closed]