Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

Hourly Stop Watch

The goal of this coding exam is to quickly get you off the ground with the clearInterval and setInterval.

Refer to the below image.

https://assets.ccbp.in/frontend/content/react-js/hourly-stop-watch-op.gif

Achieve the given functionality using JS.

The timer should be initiated at 0.

  • When the HTML button element with the id
  • startBtn is clicked, the timer should be started.
  • When the HTML button element with the id
  • stopBtn is clicked, the timer should be stopped.
  • When the HTML button element with the id
  • And do not include onclick events in the html button elements.
  • we need to access those dynamically
  • startBtn is clicked after the HTML button element with id stopBtn clicked, the timer should be resumed.
  • Timer should reset to 00 minutes, 00 seconds after one hour.

Note

This is a one hour timer. The maximum time is one hour.




You are given an array of N non-negative integers: A1A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.

Input

The first line of the input contains an integer T denoting the number of test cases.

The first line of each test case contains an integer N denoting the number of elements in the array.

The second line contains N space-separated integers A1A2, ..., AN denoting the array A.

Output

For each test case, output a single line containing the answer.

Note

A subsequence with only a single integer is also an alternating subsequence.


Create a Student class, where attributes associated with each student are name, registration


number, father name, degree and department. All attributes should not be accessed directly.


One can view the details of all students. Note student attributes cannot be changed by any


means after initialization. (Hint use constant objects)

You are a network administrator, been tasked to create a network connection of 3 different departments. Each department has got 3 pc's. In your network include DNS server, Web server, email server

input:The cat is on the mat.

output:
ehT tac si no eht .tamehT tac si no eht .tam


using split reverse the sentence without changing the order.


Write a program that calculates and prints the monthly paycheck for an employee. The program takes as input



the gross pay and name of the employee from the user. It then calculates the net pay after taking the following



deductions on the gross pay:



Income Tax = 15%



Medicare Tax = 3.5%



Pension Fund = 2.75%



House Rent = 1000 Rs (fixed amount)



T


  1. Your task is to define the sendApology() function with the following details:
  2. Return type - void
  3. Function name - sendApology
  4. Parameters - a character and an integer.
  5. The sendApology() function will first check if the character passed is either 's', 'o', 'r', or 'y'. If it is, print it based on the passed integer number of times. For example, if the passed integer is 5, then you need to print the character 5 times. Otherwise, just ignore it (i.e. don't do anything).

OUTPUT

sooorrrrrrrrryyyyy

Given Code Editor:

#include <iostream>

using namespace std;

void sendApology(char, int);

int main(void) {

sendApology('s', 2);

sendApology('f', 10);

sendApology('b', 3);

sendApology('o', 5);

sendApology('r', 12);

sendApology('m', 5);

sendApology('v', 2);

sendApology('y', 7);

 return 0;

}

void sendApology(char letter, int n) {

  // TODO: Implement the function definition  

}


the first line contains an integer n denoting the number of rows in A. the next line contains an integer ,M, denoting the number of columns in A. Each line i of the N subsequent line (where 0<=i< N) comtains M space seperated integers each :describing the ith row of A

Write a program that takes a string as input and prints “Binary Number” if the string contains only 0s or 1s. Otherwise, print “Not a Binary Number”.


(a) Ask the user to enter 5 integer values between 1 and 50. Create a simple bar graph using the character of your choice.

Hint: You may want to try to use a loop within a loop (a nested loop). Don't forget to indent properly! (2A)

For example: If the user were to enter 3, 1, 6, 2, 5, the output might look like:

***

*

******

**

*****

Extension:

(d) [challenge] Make the bar graph horizontal (2T)


LATEST TUTORIALS
APPROVED BY CLIENTS