hw3.pdf - Homework 3 Due as mentioned on wecourses You are required to submit a separate repl.it link for each of the questions The links are required

hw3.pdf - Homework 3 Due as mentioned on wecourses You are...

This preview shows page 1 out of 1 page.

Homework 3 Due as mentioned on wecourses. You are required to submit a separate repl.it link for each of the questions. The links are required to be labeled properly so it is easy for the TA to grade. The TA will randomly select and grade one of the questions. 1. Write a program that computes X^Y (X to the power of Y). You are required to use a for loop to solve the problem. Do not use the pow function from the “math.h” library. Hint: 5^4 =5*5*5*5 2. Write a program that checks if a user provided number X is a prime. You can check if a number is a prime by dividing X with all other numbers from 2 to X-1 and check that the remainder with each of these numbers is 0. 3. Request a number N >= 2 from the user. Write a program that prints the corresponding patterns (more difficult, will not be selected for grading). N=2 N=3 N=4 N=5 *x* *xx* *xxx* *xxxx* *** **x* **xx* **xxx*
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '19
  • TA, Grammatical number, Natural number, Secret

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes