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

Write a program to calculate and display sum of the following series using for loop x+x2+x3+………xn


A prisoner receives an uplifting and encouraging message from on e of his friends He uses the Chirp App to communicate with him A they exchange messages, he receives a parcel containing seme gifts with a sienes of characters labelled on it The string consists of only y Ls and Rs Deep in thoughts, he tries to understand the mean ng on the laber. He finally deciphers it as directions for hum to esca pe from the prison Given st, the task here is to find the final cardin al direction(NWES he anives when he moves according to the di recons
Asstime, the prisoner always starts his movement
LLeft direction on from North(N)
Example 1: Input:
LLR
-Value of str
Output:
-Final cardinal direction
W
Explanation:
From the input given above
As the prisoner starts from Narmo)
There was a Grocery shop. Shopkeeper would like to keep transactions as simple as he can. Here he used to take money as whole number. To optimize transactions, he decided if someone buys Ogroceries from his shop, he will round money to the nearest whole number having zero as last digit. Write a program to help Shopkeeper to make transactions much simple.



Program

Constraints: 1<N<1000000

Example 1: Input:

7659

-Positive loteger

Output:

7660 -result-Integer rounding to nearest whole number having zero

as last digit.

Explanation: Given integer 7659" which is near to 7660, the whole number having zero as last digit, Hence output is 7660.

Example 2:

Input:

50

Positive integer

Create a flowchart that will solve the area of a rectangle given the length (l) and width (w) of a rectangle. If the length and width are equal, show that the rectangle is square.


Exercise 4: Practice to manipulate data in arrays 

Write a C program that read numbers from an integer array and graph the information in the form of bar chart. The sample output is given below.

 Element Value Histogram 

0 19 ******************* 

1 3 *** 

2 15 ***************

 3 7 ******* 

4 11 *********** 

5 9 ********* 

6 13 ************* 

7 5 *****

 8 17 *****************

 9 1 *  


Exercise 1: Practice to store and print data in an array

 a) Write a C program that reads marks of 10 students in to a single subscripted array.

 b) Above marks should be between 0 to 20. Modify the above program to add marks to the array only if the input mark is between the given range.

 c) Display the values stored in the array.


 Exercise 2: Practice to access data stored in an array

 Modify the above program to find the mean of the marks stored in the array.


 Exercise 3: Practice to manipulate data in arrays 

Write a C program to create an integer array called Motion of size 5. Ask the user to enter values to the array from the keyboard. Rotate the values of the array by one position in the forward direction and display the values.

 Ex: number in index 4 should move to index 3, Number in index 3 should move to index2, number index 0 should move to index 4. 

Initial values 10 6 8 2 9

 After rotating 6 8 2 9 10 


 


Make a struct LINE include appropriate data members.

A line segment includes the endpoints, i.e. the points that it joins. 

structure should also provide a function to find the length of the Line 

Two lines can be compared to determine which line is shorter and vice versa. Provide function to compare two Lines 

Provide appropriate constructors for initialization.


Create a struct point to represent a point in cartesian coordinate system

provide member functions

default constructor

input

output

distance(returns the distance between two point objects, the function takes one object as an argument)

is zero(determines if a point is the center)

midlepoint (computes the middle point of an object from origin and returns the answer in a point object)

is equal to(compare two points)

isGreater than (compares two point in terms of the distance from the center)


A passenger train travels at a speed of 72 km/h. A man on the passenger train observes a
goods train travelling at a speed of 54 km/h in the opposite direction. If the good train passes him in X
seconds, write a C++ function to find the length of the goods train
Declare the class E-Bill consisting of data members cust_no, name, st_reading, end_reading, tot_usage and amount to find total energy usage and amount per unit of electric energy. The parameterized constructor are used to initialize object of class E-Bill, then find the total energy usage and amount per unit of electric energy and display the information of E-Bill electric energy. Finally free the resources of data objects using destructor member function. (Note: Amount per unit is Rs. 5.50)
LATEST TUTORIALS
APPROVED BY CLIENTS