0% found this document useful (0 votes)
4 views1 page

POP Assignment

The document outlines several programming tasks, including converting binary to decimal, implementing binary search on a sorted array, calculating the sum of natural numbers using recursion, finding the remainder without the modulo operator, and checking if a number is a power of 3 using recursion. Additionally, it mentions creating a specific pattern, though details are not provided. These tasks are intended to reinforce programming principles and techniques.

Uploaded by

ashrafmdadnan235
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

POP Assignment

The document outlines several programming tasks, including converting binary to decimal, implementing binary search on a sorted array, calculating the sum of natural numbers using recursion, finding the remainder without the modulo operator, and checking if a number is a power of 3 using recursion. Additionally, it mentions creating a specific pattern, though details are not provided. These tasks are intended to reinforce programming principles and techniques.

Uploaded by

ashrafmdadnan235
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PRINCIPLE OF PROGRAMMING

1. Write a program to convert the given binary number entered by the user into an
equivalent decimal number.

2. Write a program that takes an array arr[] of size N in ascending order and a target
value to be searched by the user.
Search the target value using binary search if the target value is found print
its index else print -1.

3. Write a program to calculate the sum of natural numbers up to a given number n


using Recursion.

4. Write the program to find the remainder without using the modulo operator.

5. Write a Program to check whether a number is power of 3 or not using recursion.

6. Write a Program to make the pattern as

You might also like