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

Passed test cases 1/4. Please solve it

Sample Input 1

200
3

Sample Output 1

570

Sample Input 2

180
1

Sample Output 2

180

These are just samples there are other test cases too.


let inputString = '';

let currentLine = 0;

process.stdin.on('data', inputStdin => {

    inputString += inputStdin;

});

process.stdin.on('end', _ => {

    inputString = inputString.trim().split('\n').map(string => {

        return string.trim();

    });

    main();    

});

function readLine() {

    return inputString[currentLine++];

}

function main() {

    const dayCharge = JSON.parse(readLine());

    const days = parseInt(readLine());

    let bill, discount;

    bill = dayCharge * days;

    if (days >= 2) {

      discount = 5;

      bill - (bill * discount) / 100;

    }

    if (days >= 5) {

      discount = 15;

      bill - (bill * discount) / 100;

    }

    console.log(`Total bill with the discont is ${bill}`);

}


Create a class representing a student. Include characteristics as student, number, first and last name, overall GPA, 

classification, and major. Write at least 1 default constructor. Include properties for each of the data items. 

Create a second class that instantiates the first class with information about yourself. In the second class, create a 

method that displays your name and GPA. 


We've already tried comparing 3 numbers to see the largest among all, so let's try a more complicated mission where we locate the position of the largest among 5 numbers. There are only 4 possible cases for this mission:

- if the largest digit is the first digit, print "Leftmost"

- if the largest digit is the third digit, print "Middle"

- if the largest digit is the last digit, print "Rightmost"

- if none of the above is correct, print "Unknown"

 

Now, show me how far you've understood your lessons!

Input


1. First integer

2. Second integer

3. Third integer

4. Fourth integer

5. Fifth integer

Output

The first five lines will contain message prompts to input the five integers.

The last line contains the appropriate string.

Enter·integer·1:·1
Enter·integer·2:·4
Enter·integer·3:·6
Enter·integer·4:·3
Enter·integer·5:·2
Middle




wap to show exception using try throw and catch block.


1.Reverse string using stack in python

 

import stack

 

string = 'arewen  ekil  I'

reversed_string = ''

s = stack.Stack()

 

# your solution here

 

print(reversed_string)


Create a python program that will ask the student's full name as well as grades in Chemistry, Biology, English, Physics, and Arts. Following that, it will produce an output of its General Weighted Average (GWA) with its equivalent based on the grades inputted.


create a script to solve the volume of a sphere 

output the volume of the sphere.


Huge Integers(We have to use strings int this using int is restricted)

Design a class that can handle arbitrarily large integers (using strings) that otherwise do not fit in a primitive type. A string will be treated as an integer if it contains all numeric type characters only. A sign indicating positive or negative integer may precede the string e.g. “-123456789009876543210”. Provide support for basic arithmetic and relational operations (using operator overloading) that include:


 addition: + and ++ (both pre and post increment versions)

 subtraction: - (binary as well as unary) and -- (both pre and post increment versions)

 multiplication

 division

 comparison operators: ==, <, >


Write a Java program :-


In UG Boys Hostel Having 5 floors and each floor having 15 rooms. Consider you have to allocate the hostel room for students of IT department using hashing techniques (Hint: Key=201IT253). For only final year, one student per room and all other rooms are shareable at the maximum of three students per room. You may to use any strategy but must implement code of the separate chaining and Linear probing techniques in your solution.



Create a program that will ask the user to input an integer and intify the integer is an odd or even.

LATEST TUTORIALS
APPROVED BY CLIENTS