Labby for LabEx

Posted on

10 Captivating Programming Challenges to Elevate Your Coding Skills 🚀

Are you ready to embark on a thrilling journey through the world of programming? This collection of 10 captivating challenges from LabEx will push the boundaries of your coding prowess and unlock new levels of mastery. 🧠

From mastering lambda functions to diving into complex number operations, these labs cover a diverse range of topics that will challenge and inspire you. Get ready to tackle prime number verification, explore the power of namespaces, and delve into dynamic memory allocation. 💻

1. Add Two Integers Using Lambda 🧮

In this lab, you'll create a program that adds two integers using a lambda function and then calls it with user input. Unleash the power of lambda expressions and witness the elegance of concise code. Lab Link

2. Complex Number Division 🔢

Dive into the world of complex numbers and learn how to overload the `/` operator to divide two complex numbers. Implement the provided formula and output the result in the format `real + imagi`. Lab Link

3. Printing Line Numbers Using Macro 🔢

Explore the power of preprocessor macros in this lab, where you'll write a program that prints the current line using the predefined `__LINE__` macro. Unlock the secrets of this powerful tool. Lab Link

4. Verify Prime Number Status Using C++ 🔢

Delve into the realm of prime numbers and create a program that checks whether a given number is prime or not. Count the number of divisors and output 'prime' if there are exactly two divisors, and 'not prime' otherwise. Lab Link

5. The Using Directive in Namespaces 🌐

Explore the versatility of namespaces in this lab, where you'll write a program that utilizes the `using` directive to access functions from two different namespaces. Take user input for two numbers and print the return values of these functions. Lab Link

6. Implementing Complex Number Addition 🔢

Dive into the world of complex numbers once again, this time by creating a program to add two complex numbers given by the user. Utilize a `Complex_Number` class with real and imaginary parts, and output the sum in the format `real_sum + imag_sumi`. Lab Link

7. Dynamic Memory Allocation in C++ 🧠

Unlock the power of dynamic memory allocation in this lab. You'll create a program to dynamically allocate memory to an integer pointer, get user input for the allocated memory, print the allocated value, and then deallocate the memory. Lab Link

8. Skipping a Specific Number 🔢

Explore the art of loop control in this lab, where you'll create a program that will skip a specific number in a loop and print the current number for all other iterations. Demonstrate your mastery of loop logic. Lab Link

9. Overriding Parent Class Function 🧠

Dive into the world of object-oriented programming and learn how to override the function of a parent class. Define a child class that inherits from the parent class and overrides the function to display specific information. Lab Link

10. Maximum Possible Student Handshakes 🤝

Put your mathematical skills to the test in this lab, where you'll create a program that calculates the maximum number of possible handshakes among a given number of students using the combination formula. Lab Link

Embark on this captivating programming journey and unlock your true potential as a coding enthusiast. 🎉 Happy coding!