write an algorithm,draw a flow chart and write its corresponding c program to convert a decimal number to its equivalent binary number
write an algorithm,draw a flow chart and write its corresponding c program to convert a decimal number to its equivalent binary number
1. Count and display the country which is a member of the EU (EU = yes) and not a member of the EU (EU = no).
Write a C++ program that reads 10 integer numbers and stores them in an array Numbers, sorts the numbers using the bubble sort algorithm, and displays the array elements whenever there is an element swap. This C++ program must have three functions: 1. reading the array's ten elements, 2. displaying the array's elements, 3. The array elements are being sorted.
Add two polynomials
Given two polynomials A and B, write a program that adds the give
two polynomials A and B.
Output
Print the addition of polynomials A and B.
If the term with highest degree is negative, the term should be represented as -Cix^ ^ Pi .
For the term where power is 1 represent it as C1x instead of Cl*^ ^ 1 .
If the degree of polynomial is zero and the constant term is also ero, then just print 0 to represent the polynomial. For Lerm Cix^ ^ p i if the coefficient of the term Ci is 1, simply print x ^ P * i
instead of 7x p1
Explanation
If M = 4 and for polynomial A
For power 0, co-efficient is 5
For power 1, co-efficient is 0
For power 2, co-efficient is 10
For power 3, co-efficient is 6.
If N = 3 and for polynomial B
For power 0, co-efficient is 1
For power 1, co-efficient is 2
For power 2, co-efficient is 4.
And if result is zero print 0.
And if result has 1x solution it only x.
C++ code:
Make a recursive function which displays the fibonacci series before a number that is entered by the user.
Requirements:
No global declarations
Test run in main
Diagram:
Also draw diagram to show how the recursive call is working
Write an algorithm, draw a flowchart and write a program code to display 3*3 Identity Matrix.
Difficult Addition
Arjun is trying to add two numbers. Since he has learned addition recently, an addition which requires a carry is difficult for him. Your task is to print Easy if the addition does not involve a carry, Otherwise print Hard.
Input
The first line of input contains two space separated integers A and B.
Output
If the addition does not involve a carry,print Easy, otherwise print Hard.
Explanation
When calculating 229 + 390, we have a carry from the tens digit to the hundreds digit, so the answer is Hard.
Sample Input1
229 390
Sample Output1
Hard
Sample Input2
123456789 9876543218
Sample Output2
Easy
write a program which produces the given sequence numbers.(in alternate arrangement) using the three looping statements