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

Make a C++ program that will display the sum of the values of ingeter array with a length of 6. The values of array will be input values from the user. Use for Loops.


Make a c++ program that will display all the contents of an integers array with a length of 5. Use a for Loop.


In a hypothetical situation, select an industry of your choice. Given that there is a perennial issue that begs for automation or mechanization of the "as-is system":

 i. develop a requirement elicitation technique (use at least four and explain explicitly how you used them) to appraise yourself with the issue, given that you have just been appointed as a freelance systems analyst; 

 ii. develop a use-case for the data gathered;

 iii. develop a DFD for the information gathered.

 NOTE: There should be at least 5 processes or subsystem in the organization (Meaning you should have at least 5 levels.




Did you know that in lotteries, a 3-digit number with the same numbers in all digits like 777 will hit the jackpot in a casino? In the same manner, let's make a program that will test if a certain 3-digit number hits a jackpot or not by identifying if all the digits of a given number is the same as the second inputted number. If it is, print "Jackpot!"; else, print "Nah".



Let's try this out now!





Input



A line containing two integers separated by a space.

There are n processes and six instances of a resource type A. Each process will need two instances of resource type A. You need to specify what can be a maximum number of n if you want to ensure the system without deadlock?


HALINDROME Given string S. Let us divide S to two equal parts S1 and S2. S is called halindrome if atleast any one of the following condition satisfy. a) String S is palindrom and length of S >=2 b) String S1 is halindrom. c) String s2 is halindrom. In case of odd length string, the middle element is not present in both S1 and S2. If index of middle element is M, then S1 is equal to S[0,m-1] and S2 = S[m+1, |S|- 1].

Input Specification

Input1: No. of strings. 1<= Input1 <=100

Output Specification find whether string is halindrome.

A string is Halindrom if any one of the criteria is correct .

a) String S is palindrom and its length is >=2

b) String S1 is halindrom.

c) String s2 is halindrom. if string length of S is odd then center letter is ignored and S1 is [0, len/2 -1] and S2 is [len/2+1, len-1]


ELECTROSTATICS:

Doug caught up with a rod comprising of negative(N) and positive(P) charges. He is asked to calculate the maximum net absolute value of electrostatic field possible in the region due to the rod.

Note : Assume, Electrostatic field = (absolute value of total charge) * 100;

input1 : {4,3,5}

input2 : PNP

output : (4-3+5) * 100 = 600


A patient with first stage zombie virus has escaped from the facility in a city of population N. The zombie virus is very dangerous as it passes on to othr people as they come in contact with the patient makin them a petient as well. Zombie virus has K life stages to develop, each of which takes 1 unit of time. Only the last stage is contagious. A person with zombie attack only healthy people and can oly affect one person in 1 unit of time. If the patient escaped on day 1, find out the number of days it will take to wipe out the entire city's healthy population and turn them into a last stage zombie. Note: 1 unit of time is equal to 1 day.

i/p1: Total healthy population of the city

i/p2: No. of stages of zombie virus.

Ex1

i/p1:10

i/p2:1

o/p:5

Hence, on day2, the affected population will be 2 and so on. On day 5, the affected population will be 16 which is bigger than 10. Ex2

i/p1:10

i/p2:2

o/p:6 It takes 2 days for virus to evolve.


Diana proposed an algorithm for parsing complex mathematical expressionsspecified in an infix notation is one where an operator is present between two operandse.g.(2+5.This algorithm is also used in compiler creation in the parsing phase to generate abstract syntax treeand postfix notations.The algorithm also involves parsing expressions including parenthess and power operations.the algorithm is basically,stack based.

It is a simple example of shunting yard algorithm:

input:3+4 Add 3 to the output queue(whenever a number is read,it is add to the output).push ‘+’ onto the operator stack .Add 4 to the output queue.After readind the expression ,pop the operators off the stack and add them to the output. In these case,there only one operator,’+’.The resulting postfix notation is ‘34+’.

Your friend has requested you to help him in implementing this algorithm as he has to solve large mathmatical expressions given in infix notations

Note:the characters in the input are seperated by spaces

Ex :

i/p1:10+2*6

o/p:22


Write a C++ program that creates an array “A” having 5 elements (in the main function). Then, the


program asks the user to enter values in this array. After that, the program should replace each array


element which is divisible by 3 with new value (by adding 1 to it). In the end, the main program (“main”)


shows the updated array elements in ascending order.

LATEST TUTORIALS
APPROVED BY CLIENTS