Menu
Coddy logo textTech

Is Prime

Lesson 10 of 20 in Coddy's Beginner Challenges - Practice Basic Concepts course.

challenge icon

Challenge

Easy

Write a function named isPrime that gets an integer num and returns true if num is a prime number otherwise false.

Try it yourself

#include <stdbool.h>

bool isPrime(int num) {
    // Write code here
}

All lessons in Beginner Challenges - Practice Basic Concepts