|Write a program to check if a given number is prim...|General Coding Problems

fn is_prime(n: u32) -> bool

Easy

Write a program to check if a given number is prime.

fn is_prime(n: u32) -> bool

Asked in

wipro

Examples

Example 1:
Input: 11
Output: true
Example 2:
Input: 12
Output: false
Submit Result

Click Run to test sample cases, or Submit to evaluate all cases