**The Program in C++ Program to Check If Given number is Abundant or not is given below:**

```
#include <iostream>
// Function to find the sum of proper divisors of a number
int sumOfProperDivisors(int num) {
int sum = 0;
for (int i = 1; i < num; i++) {
if (num % i == 0) sum += i;
}
return sum;
}
// Function to check if a number is abundant
bool isAbundant(int num) {
return sumOfProperDivisors(num) > num;
}
int main() {
int num;
std::cout << "Hello Codeauri Family,enter a number here to check whether the number is ugly or not!\n";
std::cin >> num;
// Check if the number is abundant
if (isAbundant(num)) {
std::cout << num << " is an abundant number." << std::endl;
} else {
std::cout << num << " is not an abundant number." << std::endl;
}
return 0;
}
```

## Output:

Hello Codeauri Family,enter a number here to check whether the number is ugly or not!

12

12 is an abundant number.

## Pro-Tips💡

An abundant number is a number for which the sum of its proper divisors (the divisors excluding the number itself) is greater than the number itself.

The `sumOfProperDivisors`

function takes a number as input and returns the sum of its proper divisors.

The `isAbundant`

function takes a number as input and returns `true`

if it is an abundant number and `false`

otherwise.

The function uses the `sumOfProperDivisors`

function to calculate the sum of the proper divisors of the number and returns `true`

if the sum is greater than the number, and `false`

otherwise.

**Learn C-Sharp ↗**

C-sharp covers every topic to learn about C-Sharp thoroughly.

**Learn C Programming ↗**

C-Programming covers every topic to learn about C-Sharp thoroughly.

**Learn C++ Programming↗**

**Learn C++ Programming↗**

C++ covers every topic to learn about C-Sharp thoroughly.