Enable contrast version

Tutor profile: Caijie C.

Inactive
Caijie C.
Software Engineer Intern
Tutor Satisfaction Guarantee

Questions

Subject: Java Programming

TutorMe
Question:

Write a java program to find whether a number is prime or not

Inactive
Caijie C.
Answer:

public static void main(String[] args) { int temp, num; boolean isPrime = true; Scanner in = new Scanner(System.in); num = in.nextInt(); in.close(); for (int i = 2; i<= num/2; i++) { temp = num%i; if (temp == 0) { isPrime = false; break; } } if(isPrime) System.out.println(num + "number is prime"); else System.out.println(num + "number is not a prime"); }

Subject: Calculus

TutorMe
Question:

Given the equation y = x^2 - x - 6, find its x intercepts, if any.

Inactive
Caijie C.
Answer:

-2, 3

Subject: C Programming

TutorMe
Question:

How do you return multiple values from a function in C?

Inactive
Caijie C.
Answer:

You can declare a structure which can be used to store multiple values as a single object. A structure is simply a custom type. You can declare a variable of this type in the function and use the structure you created to store the multiple values you intend to return. To return these values, simple return the structure.

Contact tutor

Send a message explaining your
needs and Caijie will reply soon.
Contact Caijie

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.