Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //this method is in Java
- //Made by Yashaswi Sharma
- public static void printingFunction (int n) {
- //instantiates a local variable to count from 1 to n
- int i = 1;
- //loops through to n while printing the desired functionalities
- while (i < n) {
- if (i % 2 == 0 && i % 7 == 0)
- System.out.println ("Quant Team");
- else if (i % 2 == 0)
- System.out.println ("Quant");
- else if (i % 7 == 0)
- System.out.println ("Team");
- else
- System.out.println (Integer.toString (i));
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement