end books from book bank only for two months, if it is blue he can lend books from Reference library only for a week. If it is yellow he can lend books from Circulation library for one day. If a student has green card and return book above two months so ask how many days are above from due date than charge rupees 30/ day. Calculate the total amount in the last. If a student has blue card and r
Q: write a program c++ to read two marks (m1 and m2) for N students then find the following A Number of…
A: Define header file <iostream> for standard input output. Define main() function. Define two…
Q: draw a state machine diagram of following scinerio using gaurd / trigger : A patient login into…
A: draw a state machine diagram of following scinerio using gaurd / trigger : A patient login into…
Q: write a c program to find out year in which mr kavi was born from the following information 1.…
A: Program approach: Include header files stdio.h. m,n,r, and y are user-defined integer variables…
Q: Assume you are boss of the company and you want to put on system on the office door such that if any…
A: Requirements:- Assume you are boss of the company and you want to put on the system on the office…
Q: 9 , 15 (a, c, f, k, n, and q) , 18
A: Identity Identity Complement Complement Idempotent Idempotent Annulment
Q: Study the following code and draw a control flow graph. public static void main(String[] args) {…
A: In the control flow graph in 1 node, we can combine more than 1 simple executable sentence.
Q: 6. Given, A = p A (p V q) and B = p V (p A q). State whether A = B or not. 7. Let P(x), Q(x), and…
A: here in this multi part question we have asked weather these two logical statement are equivalent…
Q: Statement: Consider an Air conditioner control system with given Rule Base and Rules Air…
A: Below are the answers with explanation: Also as per our company guidelines we are supposed to answer…
Q: 2. A program should read two positive integers and does the following: 1 read p and q 2 if p+q>100 3…
A: In black-box testing, the internal implementation of a component is not accessible, limited from…
Q: Consider the intersection shown in the figure below. A B Cars arrive at the intersection along the…
A: Binary Semaphores − Only two states 0 & 1, i.e., locked/unlocked or available/unavailable, Mutex…
Q: Let P(x), Q(x) and R(x) be the statements "is a duck", "is annoying" and "is a dancer" respectively.…
A: In predicate calculus, the phrase "∀" is called the universal quantifier. It is used for "All". The…
Q: Q1\A) A paint company is trying to recycle unpopular paint colours by mixing them together to create…
A: The solution is given below:
Q: Given the following definitions: • S: the domain of all CPSC 121 students. • G: the domain of all…
A: Predicate logic statements Statement01: ∀x∈S,∀g∈G,Ax,g↔Bx For every students from CPSC121, the…
Q: Convert to proposition (math logic) If students understand mathematics, then they will be…
A: Proposition: A proposition is a declaration of sentence which is either true or false. e.g. London…
Q: Problem 8: Design a Turing machine that takes inputs like ...B1110111111B.... deletes the middle 0,…
A: Convert a 0 in the first number in to X and then traverse entire input and convert the first blank…
Q: Let x, y, z be positive integers (x, y, z> 0) represented in unary. Assume that x> z. Design a…
A:
Q: In an old house in Russia several chests of full of hollow dolls have been discovered. These dolls…
A: ANSWER:-
Q: Write the First Order Logic of the following: (Hint: you may need to use these symbols: Vx, Ix, A,…
A: As per the answering guidelines solving the 1st three question completely. A) Let the predicate be…
Q: Construct a FSM that models a vending machine that has a door that can be opened only after $0.35 in…
A: let No coin = 0 Nickel = 01 Dime = 10 Quarter = 11 $0.35 = 35 cents
Q: The Mad Hatter is either sleep or awake. When asleep and poked the Mad Hatter mumbles "brrrr". On…
A: SEE SOLUTION IN STEP NO 2
Q: Computer Science
A: Purchasing Power Parity(PPP)Purchasing power parity(PPP) is really the concept that whenever an…
Q: Design a dynamic programming algorithm for the problem of computing a binomial coefficient by the…
A: Algorithm: int bin_coe(int n,int m) { int i=0, j=0, ans[n+1][m+1]; for(;i<=n;i++){…
Q: 1.W: Consider about a washing machine equipped with fuzzy logic controller. There are two inputs…
A:
Q: Consider two strings A and B. Take string A as your First name and Last name without space…
A: LCS stands for Longest Common Subsequence. A subsequence of a sequence appear in the same relative…
Q: If U= {a,e,i,o,u} and A={a,c,e} and B={g,o,d}, what is A^c - B^c?
A: EXPLANATION: The complement for any set contains all the elements that are present in the universal…
Q: Suppose the statement “X is an integer and X < 5” is a loop invariant at the point at which the test…
A: This is super easy to understand . First we should understand how loops work . loops have the entry…
Q: w, and you're given the choice of three doors: Behind one door is a car; behind the others, goats.…
A: Computer Science Please do a simple JAVA code for the Monty Hall problem. Suppose you're on a game…
Q: Formalize the following sentence in english: Let P(x,y) be the statement “x speaks language y" 3x.…
A: Here is the answer:-
Q: Q4/Four chairs A, B,Cand Dare placed in a row. Each chair may be occupied("1") or empty ("O“). A…
A: the truth table is F is the function and A B C D are min terms .Th below table will give output as…
Q: a) Explain on Simulated Annealing algorithm behaves at very high temperatures, and how it behaves at…
A: a) At very high temperatures, the Simulated Annealing algorithm will explore the state space more…
Q: Say we are designing a new computer programming language that includes the operators @, #, $, and U.…
A: The given expression is: w @ x # y $ z U a The given precedence is: # is higher than U, U is higher…
Q: onsider the five-state Finite Automaton represented by the following table. state a b Start 1 5 2 4…
A: Here the final state is 3,4,5 and initial state is 1.
Q: A common variable x, introduced to nothing, is worked on by four simultaneous cycles W, X, Y, Z as…
A: Semaphore is nothing but a value which can be an integer non-negative that can be used to manage the…
Q: 3. Write the First Order Logic of the following: (Hint: you may need to use these symbols: Vx, 3x,…
A: first order logic of the given following questions are explained in step 2:-
Q: described Mancala variant in C++ in the pictures. Player 1 will be a human while the other will be a…
A: It is defined as a direct descendant of C programming language with additional features such as type…
Q: Answer Only using C++ There are two A, B players playing the game. Player A is angry with him, and…
A: Coded using C++.
Q: A electricity bill service provider uses a program that computes the monthly bill of customers as…
A: Program Plan: Include standard header file and namespace Create a function calculateBill() if…
Q: Statement: Consider an Air conditioner control system with given Rule Base and Rules Air Temperature…
A: Below are the answers with explanation: Also as per our company guidelines, we are supposed to…
Q: possible toss can result in a tail (represented by 1) or a head (represented by 0). Let the logical…
A: Here first we need to write the truth table F=1 when only one of X,Y,Z is 1 or all are 0. The truth…
Q: 13. p(x): x is intelligent q(x): x reads book r(x): x is a student in your class Find the…
A: Lets see the solution.
Q: Suppose we have four machines that are using the Berkeley algorithm for clock synchronization. The…
A: Solution:-- 1)The given question is an type of the multiple choice question as 4 options have been…
Q: WHILE travelling in a train you observe some colleges student pulling the alarm chain simply to…
A: NOTE: SINCE THE LANGUAGE WAS NOT MENTIONED IN THE QUESTION, I HAVE USED C FOR THE CODE. Program…
Q: Consider two strings A and B. Take string A as your First name and Last name without space…
A: Dear Student, As no language was provided I am coding it in C.
Q: A Exercise 1: Find the ECT, CPM and Slack A2 D4 B3 E2 C6 F7 43 N3 MI GI 04 12 L4 PI K2
A: Answer: ADEHIJK - 20ADEGJK - 16ADEFMLK - 22ADEFNOLK - 28ADEFNPK - 21ACHIJK - 20ACGJK - 16ACFMLK -…
Q: 7. Hany is a student in this class. He knows how to write programs in Python. Given that everyone…
A: Given that, Hany is a student in the class and he knows how to write programs in python. Every one…
Q: Answer in C++ only In Banasthali, we feel like a family. Every festival is celebrated with great…
A: Coded using C++ language. Input: 132 2 3 Output: 3
Q: For Scheduled Job, we can preset a time or an action with this to run the scheduled job: Group of…
A: Answer in step2
Q: Exercise. Determine the truth value of each expression, given that the domain of all the variables…
A: Let's see the solution
Q: nglish, where C(x) is “x is a comedian” and F(x) is “x is funny” and the domain consists of all…
A: Let us translate the following statements into English sentences, where C(x) =xx is a comedian F(x)…
Design an IU library management system through nested if-else. Here is a pseudo code.
- If a student is enrolled in I.U and has enrollment i.d so check library card.
- If it is green he can lend books from book bank only for two months, if it is blue he can lend books from Reference library only for a week. If it is yellow he can lend books from Circulation library for one day.
- If a student has green card and return book above two months so ask how many days are above from due date than charge rupees 30/ day. Calculate the total amount in the last.
- If a student has blue card and return book above a week so ask how many days are above from due date than charge rupees 50/ day. Calculate the total amount in the last.
- If a student has yellow card and return book above a day so ask how many days are above from due date than charge rupees 100/ day. Calculate the total amount in the last.
I WANT CODE IN C++
Step by step
Solved in 2 steps
- Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance =netBalance x d1-payment x d2d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: Interest= averageDailyBalance * 0.0152 Write a program using c++ compiler that accepts as inputnetBalance, payment, d1,d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.Computer Science Investing in stocks is a way to create assets that are supposed to provide financial security over time. In solving this problem, we assume that an investor buys several shares of stock at a certain price. These shares are going to be sold later on for a different price. Obviously, if the selling price is higher than the acquisition price, the investor makes a profit, registering capital gain. If the shares are sold at a lower price, the investor has a loss, which marks a negative capital gain. This whole process is done over a period of time, and you are required to create a scenario for buying and selling shares. The assumption is that the investor sells shares in the order in which they were purchased. The goal is to calculate the capital gain over time. Suppose that you buy n shares of stock or mutual fund for d dollars each. Later, you sell some of these shares. If the sale price exceeds the purchase price, you have made a profit—a capital gain. On the other…Problem You have a fence post located at the point (x,y) where a goat is tethered by a rope. You also have a house, which is a rectangle with diagonally opposite corners at the points bottom-left: (x1,y1) and top-right: (x2,y2). You want to pick a length of rope that guarantees the goat cannot reach the house. Determine the minimum distance from the fence post to the house, so that you can make sure to use a shorter rope. Recall that the distance formula is: (x2−x1)2+(y2−y1)2 The input consists of a single line containing six space-separated integer values: x, y, x1, y1, x2, and y2. You are guaranteed that x1<x2 and y1<y2, and that (x,y) is strictly outside the axis-aligned rectangle with corners at (x1,y1) and (x2,y2). Return the minimum distance from the goat’s post to the house as a floating-point value from main(). Learning Objectives Be able to create a program with a lesser template. Be able to calculate the min/max of integers. Be able to write a mathematical…
- H.W: Consider about a washing machine equipped with fuzzy logic controller. There are two inputs applied in the machine and one output. The first input is amount of clothes and the second input is type of dirt. The rules applied in the system is shown 1.IF amount of clothes is LARGE and type of dirt is GREASY THEN wash time is LONG; below: 2.IF amount of clothes is MEDIUM and type of dirt is MEDIUM THEN wash time is MEDIUM; 3.IF amount of clothes is SMALL THEN wash time is SHORT. The membership of each input is as shown in Figure 1. The output of the system is as shown in Figure 2. If you have a 4.5 kg of cloths to be washed, and your clothes are in level 3 of greasiness, then calculate the washing time needed using Mamdani style inference. FXX XX XX 0.5 0.5 0.5 Not medium greasy small medium large greasy Short V medium O 1 2 3 4 5 6 2 4 6 8 10 Level of greasiness Dirty cloths, kg 60 Washing time, minutes (a) (b) Figure 1 Input of the system (a) dirty clothes (b) level of greasiness…2. A safe has 5 locks v, w, y and z; all of which must be unlocked for the safe to open. The keys to the locks are distributed among five executives in the following manner.Mr. A has keys for locks v and x. Mr. B has keys for locks v and y. Mr. C has keys for locks w and y. Mr. D has keys for locks x and z. Mr. E has keys for locks v and z.a) Determine the minimal number of executives required to open the safe.b) Find all the combinations of executives that can open the safe; write and expression f(A, B, C, D, E) which specifies when the safe can be opened as a function of what executives are present.c) Who is the essential executive?Conway's Game of Life: This is a zero person game with the following rules: (see Wikipedia for example) Any live cell with fewer than two live neighbours dies, as if by underpopulation. Any live cell with two or three live neighbours lives on to the next generation. Any live cell with more than three live neighbours dies, as if by overpopulation. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. Remember the oscillator or blinker of 3 cells. You can also find this blinker on Wikipedia. 1 21 1 2 1 21 3. 4 6 4. 6. 4 8. 9 8 9 #1 #2. #3 5. Consider now these 3 creatures at stage 1: Show how they look like in the next two stages: stage 2 and stage 3. Explain how you get the answers Creature 1 Creature 2 Creature 3 (here creature 1 is the blinker of 3 cells, horizontally; creature 2 consists of two adjacent cells, creature 3 consists of 4 adjacent cells horiztonally) ww (d) Creature 1 (10%), (e) Creature 2 (8%), (f) Creature 3 (20%)
- Question 4: The ongoing Covid pandemic in the word has scared the authorities at Hazrat Shahjalal International Airport in Dhaka and they have asked the CSE department of BRACU to design a system that would help them to decide what to do with people coming in from African countries that are at risk. The Airport authorities has approved the following specifications for the system: Input (4 variables) F = 1 indicates the passenger HAS FEVER. H = 0 indicates the passenger DOES NOT HAVE a SEVERE HEADACHE. M = 1 indicates the passenger HAS MUSCLE PAIN. A = 0 indicates the passenger DOES NOT HAVE ABDONIMAL (STOMACH) PAIN. Output (3 variables)8. Consider the following: An online trading company wants to offer discounts to new customers. The company has recently emailed discount code to the customers. New customer must have a discount code to be eligible but returning customer are not eligible for a discount. Let A = Returning Customer B = Discount Code (a) Draw a truth table to represent when a customer has a discount. (b) From your truth table in (a) produce a Boolean expression to represent discounted customer (Q) for the trading company.Jin Mori is like any other student who loves sleeping. Jin Taejin, his grandfather, imposes a waking schedule that Jin Mori must follow to avoid tardiness at his school. The schedule stated that on weekdays, Mori must be awake at "7:00" and at "10:00" at weekends. Taejin added an exemption for their school vacation. If it is their school vacation, the schedule is "10:00" for weekdays and "off" for weekends. If Jin will not follow the schedule, he is not allowed to practice his favorite martial art, taekwondo. Your job is to create a program that will serve as the alarm clock for Jin Mori. Expected Output: Test Case 1: Vacation: False Day: Monday Alarm Time: 7:00 Awake: Yes Be ready for your practice Mori! Test Case 2: (input) (input) (auto generated) (input) Vacation: False Day: Saturday Alarm Time: 10:00 Awake: No (input) (input) (auto generated) (input) You are not allowed to practice your taekwondo!
- Implement Thirsty problem using semaphore. Write the code in C/C++ Scenario: To drink, a thirsty person must have three things; water, ice and a glass. There are three thirsty people, each having a different one (and only one) of the three required items. A fourth person, a server has unlimited supply of all three items. If nobody is drinking, the server places two of the three items (chosen at random) onto table. Thirsty person who can make a drink from those two items will pick them up and drink a glass of ice water. When done, thirsty person will notify the server and the process will repeat.INTRODUCTION: Heat conduction from a cylindrical solid wall of a pipe can be determined by the follow T1-T2 q = 2nLk R2 In R. where: q is the computed heat conduction in Watts. k is the thermal conductivity of the pipe material in Watts/°C/m. L is the length of the pipe in cm. Ri is the inner radius of the pipe in cm. R2 is the outer radius of the pipe in cm. Ti is the internal temperature in °C. T2 is the external temperature in °C. ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the pipe, the the internal and external temperatures. Once the user enters the input values, the programBus timetables specify to the second the exact arrival and departure time of each bus on each stop. You need to pay for the full fare of every bus you ride and different bus lines charge different fees , but they are flat fees (independent of distance travelled on the line) A travel plan is a sequence of stop-time pairs where stop is a location of a bus stop and time is when we arrive at that stop. The plan is feasible if for any two consecutive pairs (a, t) and (b, t′) in the plan there exists a bus that departs after t and arrives at b at exactly t′. That is, a travel plan does not allow us to walk between stops. Assuming that no two buses arrive at the same time at the same stop, a feasible plan uniquely identifies the bus lines that we need to take to realize the plan. The cost of the plan is the sum of the fares we need to pay. Your task is to design an efficient algorithm that given a departure time t, an arrival time t′, an origin stop a and a destination stop b, finds the…