| Title | Open | |||
|---|---|---|---|---|
| 99 | Function: Square a NumberComplete the function square so it returns its argument multiplied by itself. | easy | Not started | Solve |
| 100 | Function: Cube a NumberComplete the function cube so it returns its argument raised to the third power. | easy | Not started | Solve |
| 101 | Function: Add Two NumbersComplete the function add so it returns the sum of its two parameters. | easy | Not started | Solve |
| 102 | Function: Maximum of TwoComplete the function maxOf so it returns the larger of its two parameters. | easy | Not started | Solve |
| 103 | Function: Minimum of TwoComplete the function minOf so it returns the smaller of its two parameters. | easy | Not started | Solve |
| 104 | Function: Absolute ValueComplete the function absValue so it returns the absolute value (magnitude) of its parameter. | easy | Not started | Solve |
| 105 | Function: Is EvenComplete the function isEven so it returns 1 if its parameter is even and 0 if it is odd. | easy | Not started | Solve |
| 106 | Function: Sum from 1 to NComplete the function sumTo so it returns the sum of all integers from 1 up to n (inclusive). | easy | Not started | Solve |
| 107 | Function: FactorialComplete the function factorial so it returns n! | easy | Not started | Solve |
| 108 | Function: Celsius to FahrenheitComplete the function toFahrenheit so it converts a whole-number Celsius temperature to Fahrenheit using the formula F = C 9 / 5 + 32. | easy | Not started | Solve |
| 109 | Function: Rectangle AreaComplete the function area so it returns the area of a rectangle (width times height). | easy | Not started | Solve |
| 110 | Function: PowerComplete the function power so it returns base raised to exp using a loop (do not use pow()). | easy | Not started | Solve |
| 111 | Function: Count DigitsComplete the function countDigits so it returns how many digits a positive integer has. | easy | Not started | Solve |
| 112 | Function: Is PrimeComplete the function isPrime so it returns 1 if n is a prime number and 0 otherwise. | easy | Not started | Solve |
| 113 | Function: Average of ThreeComplete the function average so it returns the integer average of its three parameters (their sum divided by 3). | easy | Not started | Solve |
| 226 | Square a Number with a FunctionWrite a function named square that takes one integer parameter and returns that number multiplied by itself. | easy | Not started | Solve |
| 227 | Add Two Numbers Using a FunctionDefine a function named add that takes two integer parameters and returns their sum. | easy | Not started | Solve |
| 228 | Larger of Two Numbers (Drill)Write a function named maxOf that takes two integers and returns whichever one is larger (return either value if they are equal). | easy | Not started | Solve |
| 229 | Even or Odd CheckerCreate a function named isEven that takes an integer and returns 1 if the number is even and 0 if it is odd. | easy | Not started | Solve |
| 230 | Cube a NumberDefine a function named cube that takes an integer and returns the number multiplied by itself three times (n n n). | easy | Not started | Solve |
| 231 | Absolute Value FunctionWrite a function named absValue that takes an integer and returns its absolute value (the number without its sign). | easy | Not started | Solve |
| 232 | Rectangle Area FunctionCreate a function named area that takes two integers, a width and a height, and returns the area of the rectangle (width times height). | easy | Not started | Solve |
| 346 | Function: Multiply Two NumbersWrite a function multiply(int a, int b) that returns the product of a and b. | easy | Not started | Solve |
| 347 | Function: Subtract Two NumbersWrite a function subtract(int a, int b) that returns a - b. | easy | Not started | Solve |
| 348 | Function: Is OddWrite a function isOdd(int n) that returns 1 when n is odd and 0 when it is even. | easy | Not started | Solve |
| 349 | Function: Double a NumberWrite a function doubleValue(int n) that returns n multiplied by 2. | easy | Not started | Solve |
| 350 | Function: Circle AreaWrite a function circleArea(double r) that returns the area of a circle using pi = 3.14159 (area = pi r r). | easy | Not started | Solve |
| 351 | Function: Fahrenheit to CelsiusWrite a function toCelsius(double f) that converts Fahrenheit to Celsius using (f - 32) 5 / 9. | easy | Not started | Solve |
| 352 | Function: Triangle AreaWrite a function triangleArea(double base, double height) that returns 0.5 base height. | easy | Not started | Solve |
| 353 | Function: Is VowelWrite a function isVowel(char c) that returns 1 if c is a lowercase vowel (a, e, i, o, u) and 0 otherwise. | easy | Not started | Solve |
| 354 | Function: To UppercaseWrite a function toUpper(char c) that converts a lowercase letter to uppercase by subtracting 32 from its character code. | easy | Not started | Solve |
| 355 | Function: Nth Triangular NumberWrite a function triangular(int n) that returns the nth triangular number using the formula n (n + 1) / 2. | easy | Not started | Solve |
| 356 | Function: Print a Line N TimesWrite a void function printLines(int n) that prints Hi on its own line n times. | easy | Not started | Solve |
| 357 | Function: Is DivisibleWrite a function isDivisible(int a, int b) that returns 1 if a is evenly divisible by b and 0 otherwise. | easy | Not started | Solve |
| 358 | Function: Half a NumberWrite a function half(double n) that returns n divided by 2. | easy | Not started | Solve |
| 114 | Function: Greatest Common DivisorComplete the function gcd so it returns the greatest common divisor of two positive integers. | medium | Not started | Solve |
| 115 | Function: Reverse a NumberComplete the function reverseNum so it returns the digits of a positive integer reversed. | medium | Not started | Solve |
| 116 | Function: Sum of DigitsComplete the function sumDigits so it returns the sum of the digits of a positive integer. | medium | Not started | Solve |
| 117 | Function: Nth FibonacciComplete the function fib so it returns the nth Fibonacci number (1-indexed, where fib(1)=0, fib(2)=1, and each later term is the sum of the previous two). | medium | Not started | Solve |
| 118 | Function: Is Palindrome NumberComplete the function isPalindrome so it returns 1 if a positive integer reads the same forwards and backwards, and 0 otherwise. | medium | Not started | Solve |
| 119 | Function: Count VowelsComplete the function countVowels so it returns how many lowercase vowels (a, e, i, o, u) are in a string. | medium | Not started | Solve |
| 120 | Function: Maximum of an ArrayComplete the function maxOfArray so it returns the largest value in an integer array. | medium | Not started | Solve |
| 233 | Factorial with a FunctionWrite a function named factorial that takes a non-negative integer n and returns n! | medium | Not started | Solve |
| 234 | Prime Number CheckerWrite a function named isPrime that takes an integer and returns 1 if it is prime and 0 otherwise. | medium | Not started | Solve |
| 235 | Sum of Digits (Practice)Write a function named sumDigits that takes a non-negative integer and returns the sum of its individual digits (for example, 1234 gives 1 + 2 + 3 + 4 = 10). | medium | Not started | Solve |
| 359 | Function: Maximum of ThreeWrite a function max3(int a, int b, int c) that returns the largest of three integers. | medium | Not started | Solve |
| 360 | Function: Minimum of ThreeWrite a function min3(int a, int b, int c) that returns the smallest of three integers. | medium | Not started | Solve |
| 361 | Function: Sum of ArrayWrite a function sumArray(int arr[], int n) that returns the sum of the first n elements of arr. | medium | Not started | Solve |
| 362 | Function: Average of ArrayWrite a function average(int arr[], int n) that returns the average of the n elements as a double. | medium | Not started | Solve |
| 363 | Function: Count Even Numbers in ArrayWrite a function countEven(int arr[], int n) that returns how many of the first n elements are even. | medium | Not started | Solve |
| 364 | Function: Is Leap YearWrite a function isLeap(int y) that returns 1 if year y is a leap year, else 0. | medium | Not started | Solve |
| 365 | Function: Clamp a ValueWrite a function clamp(int x, int lo, int hi) that returns lo if x is below the range, hi if x is above it, and x otherwise. | medium | Not started | Solve |
| 366 | Function: Sum of Squares from 1 to NWrite a function sumSquares(int n) that returns 1^2 + 2^2 + ... | medium | Not started | Solve |
| 367 | Function: Count Occurrences in ArrayWrite a function countOccurrences(int arr[], int n, int target) that returns how many times target appears among the first n elements. | medium | Not started | Solve |
| 121 | Function: Recursive FactorialComplete the function factorial so it computes n! | hard | Not started | Solve |
| 122 | Function: Recursive Sum to NComplete the function sumTo so it returns the sum of all integers from 1 to n using RECURSION (no loops). | hard | Not started | Solve |
| 123 | Function: Swap with PointersComplete the function swap so it exchanges the values of two integers using POINTERS. | hard | Not started | Solve |
| 368 | Function: Recursive PowerWrite a recursive function power(int base, int exp) that returns base raised to exp (assume exp >= 0). | hard | Not started | Solve |
| 369 | Function: Recursive GCDWrite a recursive function gcd(int a, int b) that returns the greatest common divisor using Euclid's algorithm: if b == 0 return a, otherwise return gcd(b, a % b). | hard | Not started | Solve |
| 370 | Function: Reverse a StringWrite a function reverse(char s) that reverses the characters of the string s in place using two indices (or pointers) that move toward the middle and swap. | hard | Not started | Solve |