Question: 4) Write function isprimelint x that takes an integer number and returns true if it is a prime, false otherwise. Use that function to print
4) Write function isprimelint x that takes an integer number and returns true if it is a prime, false otherwise. Use that function to print the prime numbers between 2 and 100. 5) Write function digitsint n) that receives an integer and returns number of digits in that number for example, if n is 345, the function should return 3 Test this function in the main 6) Using a loop, Write a function printTriangle(int x) that received integer and print a triangle shape with that length. For example, if x was 10 then the shape is: tw In the main, read an integer from user then call the function printTriangle Write code c++ for beginners ( if, loops)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
