1. A software company sells a package that retails for $99. Quantity discounts are given according to the following table.
Quantity 10-19, 20-49 50-99 100 or more. discount 20% 30% 40% 50%
Write a program that asks for the number of units sold and computes the total cost of the purchase.
Input validation: Make sure the number of units is greater than 0.
Sample Output1:
How many units were sold? 0
Units sold must be greater than zero.
Write a program that asks for the number of units sold and computes the total cost of the purchase.
Input validation: Make sure the number of units is greater than 0.
Write a program to determine the price for a portrait sitting. The price is determined by subjects in portraits, background chosen and sitting appointment day. The fee schedule is shown below.
Fancy background and sitting appointment cost an extra 10 percent more than the base price.
1 $100 2 $130 3 $150 4 $160 5 or more $165
In this assignment, let's build a Book Search page by applying the concepts we learned till now.
Refer to the below image.
The page should perform the operation as shown in the following image link:-
https://assets.ccbp.in/frontend/content/dynamic-webapps/bookmark-maker-output.gif
Instructions:
Use this Background image:
https://assets.ccbp.in/frontend/dynamic-webapps/book-search-bg.png
CSS Colors used:
Text colors Hex code values used:
#323f4b
#ffffff
CSS Font families used:
please help me.
Write C++ Program and Test the following function:
void multiply (float a[ ], int n, float b[]);
The function multiplies the first n elements of a by the corresponding first n elements of b.
For example, if a is the array {2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9} and b is the array
{4.0,–3.0, 2.0,–1.0,0.0, 0.0}, then the call multiply(a,5,b) would transform a into the
array {8.8,–9.9,8.8,–5.5, 0.0,7.7,8.8,9.9}.
Jane has opened a new fitness center with charges of 2500 per month so the cost to become a member of a fitness center is as follows: (a) For senior citizens discount is 30%; (b) For young one, the discount is 15%; and int roll_no; string name; int phone_number; }; int main(){ student p1 = {1,"Brown",123443}; student p2; p2 = p1; cout << "roll no : " << p2.roll_no << endl; cout << "name : " << p2.name << endl; cout << "phone number : " << p2.phone_number << endl; return 0; } 5. Lab Exercise: Lab Task 1: Jane has opened a new fitness center with charges of 2500 per month so the cost to become a member of a fitness center is as follows: (a) For senior citizens discount is 30%; (b) For young one, the discount is 15%; and (c) For adults, the discount is 20%. Write a menu-driven program (using structure) that a. Add new member b. Displays the general information about the fitness center and its charges. c.
What is the importance of automata theory? Where it can be applied? What is the basic unit of language? Show the examples
Draw DFAs for the regular expression R= a ∗ (ba∗ ba∗ ) ∗
Create a class Rectangle having width and length private members. The class certain a parameterised constructor for setting the width and length. It includes functions named clAire and calPerimeter that returns the area and perimeter of the Rectangle respectively. Also, overload the equality operator via friend function that compares whether two Rectangle objects are sunse or not.
In the main function, create two rectangle instances. Write necessary statement to call the above functions
Create a program using a one-dimensional array that accepts five input values from the keyboard. Then it should also accept a number to search. This number is to be searched if it is among the five input values. If it is found, display the message “Searched number is found!”, otherwise display “Search number is lost!”.
Manufacturing Date
Given a expiry date
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function main() {
const expiryDate = new Date(readLine());
const monthsBeforeExpiry = parseInt(readLine());
const manufacturingDate = /* Write your code here */
/* Please do not modify anything below this line */
console.log(`${manufacturingDate.getDate()}-${manufacturingDate.getMonth() + 1}-${manufacturingDate.getFullYear()}`);
}