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

fn is_prime(n: u32) -> bool

Easy

Write a program to check if a number is prime.

fn is_prime(n: u32) -> bool

Asked in

infosys

Examples

Example 1:
Input: 13
Output: true
Example 2:
Input: 15
Output: false
Submit Result

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