Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Draw ERD, Class Diagram, System level Use Case diagram, Sequence Diagram of Online Ordering and Payment System


For every program, there should be a softcopy file containing (i) Algorithm/Flowchart, (ii)


Source Code, (iii) Output



Q.Write a menu-driven program, using user-defined functions to find the area of rectangle, square,


circle and triangle by accepting suitable input paramters from user.

For every program, there should be a softcopy file containing (i) Algorithm/Flowchart, (ii)


Source Code, (iii) Output



Q.Write a menu driven program to convert the given temperature from Fahrenheit to Celsius and vice


versa depending upon users choice.

For every program, there should be a softcopy file containing (i) Algorithm/Flowchart, (ii)


Source Code, (iii) Output



Q.Write a program to calculate the product of two compatible matrices A and B.

For every program, there should be a softcopy file containing (i) Algorithm/Flowchart, (ii)

Source Code, (iii) Output


Q.Write a program to calculate the sum of two compatible matrices A and B


For every program, there should be a softcopy file containing (i) Algorithm/Flowchart, (ii)

Source Code, (iii) Output


Q.Write a program to calculate total marks, percentage and grade of a student. Marks obtained in each

of the three subjects are to be input by the user. Assign grades according to the following criteria :

Grade A: Percentage >=80

Grade B: Percentage>=70 and <80

Grade C: Percentage>=60 and <70

Grade D: Percentage>=40 and <60

Grade E: Percentage<40


For every program, there should be a softcopy file containing (i) Algorithm/Flowchart, (ii)

Source Code, (iii) Output

Q.Write a program to find sum of the following series for n terms: 1 – 1/2 + 1/3.....+1/n × (-1)^(n-1).


Write a program to read the elements of a sparse matrix from the user and display it 

in its 3-tuple form. Your program should verify whether at the entire matrix is 

sparse or not.


Write an algorithm to check prime number

I want answer this question


Cubes and Squares

by CodeChum Admin

You can also make a list of numbers, ey? Let's go and have some fun in tweaking the values of each element, but let's give it some twist to add on some fun to the code.


Let's have a go at it!


Instructions:

  1. An array containing 40 integer elements is already provided for you in the code editor below.
  2. Using loops and conditions, print out the cube of the array element if it is a positive number, and print out the square of the number if it is negative. Each result must be printed out separately by each line.

Output

The squares and cubes of the elements in the array.

4
1
1
8
27
.
.
.
LATEST TUTORIALS
APPROVED BY CLIENTS