C PROGRAM How to get age from user input DOB (mm/dd/yy)? for example: user enters: 05/10/84 Then the age be, 36 >>imagine every month has 30 days<
Q: Q2/ Choose True or False: 1. C++ program structure is divided into four sections. a) True b) False…
A: There are some questions given on C++ which are either true or false. The correct options are given…
Q: c++ programming Given the following functions: void sum(int a, int b) { cout << a+b << "\n"; }…
A: In the given program the function sum is defined twice. In the first function, the return type is…
Q: In C++ Language (please use hint) : Write a function which will swap its arguments if the first…
A: Call by reference: In this approach, passing the arguments to a method copies the address or…
Q: ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the…
A: Question given: A formula is given for calculate heat conduction from a cylindrical solid wall of…
Q: C++ PROBLEM: PASTE INDENTED CODE PLZZ Given the following functions: void increment(int x, int…
A: 1. Explanation: In the main() function, initializing n = 10 and amount = 5 Calling the increment()…
Q: C++ program that inputs 10 integers from the user and passes them one at a time to the function is…
A: Actually, program is a executable software that runs on a computer.
Q: AQ2. Write a C program to display the hour glass shape on the screen using the function named…
A: The Given Question requires to print the Given HourGlass Pattern using '*' for n number of Rows.…
Q: Graph plotting write a code (can be in c ++, python, c # ...) that graphically represents the…
A: Given: Graph plottingwrite a code (can be in c ++, python, c # ...) that graphically represents the…
Q: ASSIGNMENT: Write a C program that will allow the user to enter the inner and outer radii of the…
A: the answer is given below :
Q: In C++ If execution of a subset of statements is required multiple places in a program, it is…
A: The correct option for this question is-(option: B)"Use a switch-case-break structure."
Q: Q# 4. write in c programming Write a program that will ask the user to enter Date of Birth (DOB) and…
A: Algorithm: Create a operate that's main operate .Declare 3 variables and store the present day and…
Q: Write exactly these 3 functions: power(x,y), print(text, number) function and the main() function.…
A: The given c++ program will return integer result that is calculated by raising a number x
Q: H.W// Write the output of C++ program that appearing on the screen of computer after executing:…
A: Given: #include <iostream.h>#include <conio.h> main() { int x,y; cout<<…
Q: Problem description. In C++ In Betjemanian University, everyone has to enter his/her name on a…
A: Coded using C++.
Q: a. Declare variables to store three sides of a triangle. The variable should be able to be accessed…
A: #include <stdio.h>#include<math.h> float AreaOfTraingle(float,float,float);…
Q: Write a C program: The use of computers in education is referred to as computer-assisted instruction…
A: Program approach – Include the essential header files. Declare the variables. Define the function…
Q: Develop a c++ program that will accept two integer numbers (Minimum and Maximum). The program…
A:
Q: Write 2 functions in C program thát calculate surface drea and the volume of 3 (three) boxes where…
A: Logic:- iterate from i=1 to i=3 read l, b and h call volume(l,b,h) call(surfaceArea(l,b,h)…
Q: C Program waite a function that Computes andd keturn X. Function will take values of X and Y as…
A: PROGRAM CODE: #include <stdio.h> // include header file for standard input…
Q: Write a function max_magnitude() with two integer input parameters that returns the largest…
A: Algorithm of function max_magnitude(user_val1, user_val2): 1. Check condition: 1.1. IF absolute…
Q: Define a function named swap_values that takes four integers as parameters and swaps the first with…
A: Swap is a function that directly swaps values between two given variables of the same types.
Q: Write a c++ function int calculate(int x) which returns the value of 2x2 + 10sin(x) -12
A: Given: int calculate(int x) Requirement- Complete the function such that it returns 2x2 + 10sin(x)…
Q: Q1. Write a C++ program which initializes the earning of an employee. The program should calculate…
A: NOTE: As per the guidelines, we are allowed to answer only one independent question per post. Kindly…
Q: 1- Write C++ program (a Main function) that prints out whether a thrill-seeking person standing in…
A: Program Explanation:- Using the header file. Using the standard namespace input/output function.…
Q: C++ One common security function in check-writing requires that the amount be written in numbers…
A: ANSWER:-
Q: y = floor( x + 0.5 ); rounds the number x to the nearest integer and assigns the result to y. use…
A: C++ code for above : #include <iostream>#include <math.h>using namespace std; int…
Q: Vrite a C++ program that determines a student's grade. The program will read mid-term, and inal…
A: While(1) is infinite loop which continues until a break statement is not encountered. condition to…
Q: 2-) Write C program to dispense change. The user enters the amount paid and the amount due. The…
A: (1)Read the amountPaid and amountDue (2)Ensure enough amount is paid to get the change (3)Call the…
Q: write a code (can be in c ++, python, c # ...) that graphically represents the function f (w, t) =…
A: I have written a simple python code to plot the function.…
Q: Python problem Problem statement Write a program that prints all the prime factors of a number,…
A: import math def primeFactors(n): # Print the number of two's that divide n while n %…
Q: write a C program (not C++) + Students are not allowed to use input/output statements for questions…
A: As you have asked multiple questions answering first question. If you want solution of any specific…
Q: Define the function: int power (int base, int exp) {/*It accepts the arguments for base and exponent…
A: I give the code in C as per your requirement along with output and code screenshot
Q: In C++ using endl; Write a program that can be used to calculate the federal tax. The tax is…
A: Program: #include <iostream> using namespace std; //function getData void getData(char…
Q: Question 4 OneAuni is a sandwich shop which provides a variety of sandwiches. The following are the…
A: Answer : In the above a question we have to do a cpp code of following OneAuni sandwich shop, so I…
Q: C++PROBLEM: Write a C++ program that will accept 3 strings (these should be of different sizes)…
A: Step-1: StartStep-2: Declare string array str of size 3Step-3: Declare a string variable tempStep-4:…
Q: Q2) The following graph shows the x and y coordination of different cities. Write a C Program that…
A: Declare six integer variables to hold the x and y coordinates of the three points. Initialize the…
Q: Lab1: Conversion CS-116 The purpose of this lab is for you to familiar with your C++ development…
A: #include<iostream> #include<string> #include<iomanip> #include<ctime> using…
Q: Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a…
A: using System;using System.Collections;using System.Globalization; using static System.Console;…
Q: A C that deletes the desired character in a text that the user has entered on the keyboard write the…
A: Read a text string from the user and deleting a character. Pass the two arguments to the function.…
Q: Write a random dice program in C++ requirements: -user selects number of dices -user can select up…
A: C++ used to answer this question
Q: (d) Show C++ statement so that class Y has a friend function named saleInput(..). This friend…
A: statement:-
Q: Assignment Write a program in C that converts temperatures between Fahrenheit, Celsius, and Kelvin.…
A: Below is the required code in C language. Program Approach: Including necessary header files for…
Q: Exercise 1- Square natural numbers Exercise Objectives V Using built in functions Problem…
A: Since no programming language is mentioned, I am using c++ Algorithm: Start Read number n…
Q: An Auto Insurance Program Example - Write a C++ program to determine the cost of an…
A: PROGRAM: //Header File #include <iostream> using namespace std; //Defining main int main() {…
Q: Graph plotting write a code (can be in c ++, python, c # ...) that graphically represents the…
A: Python program to plot the given function f (w, t) = Eo cos (wt + δ), where Eo=1 , w=1, δ=0 for t=0…
Q: Problem Statement A long stretch of beach is represented by a string of two characters: 0 - free, 1…
A: def sun_loungers(string): string = list(string) count = 0 l = len(string) if l >…
Q: A 4th grader is having trouble with Permutation and Combination problem in Mathematics, so a friend…
A: #include <iostream> using namespace std;int findFact(int n){ return n == 1 ? 1 : n *…
Q: 1. Write a C program which will calculate and display the net salary of an employee after tax and…
A: As per our guidelines we are supposed to answer only one question in case of multiple questions.…
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
C
How to get age from user input DOB (mm/dd/yy)?
for example:
user enters: 05/10/84
Then the age be, 36
>>imagine every month has 30 days<
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- (Data processing) Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100 are leap years. For example, because 1600 is evenly divisible by 400, 1600 was a leap year. Similarly, because 1988 is evenly divisible by 4 but not by 100, it was also a leap year. Using this information, write a C++ program that accepts the year as user input, determines whether the year is a leap year, and displays a message telling the user whether the entered year is or is not a leap year.(Civil eng.) Write a C++ program to calculate and display the maximum bending moment, M, of a beam that’s supported on both ends (see Figure 3.8). The formula is M=XW(LX)/L, where X is the distance from the end of the beam that a weight, W, is placed, and L is the beam’s length. You program should produce this display: The maximum bending moment is xxxx.xxxx The xxxx.xxxx denotes placing the calculated value in a field wide enough for four places to the right and left of the decimal point. For your program, assign the values1.2,1.3,and11.2toX,W,andL.(Statistical) In many statistical analysis programs, data values considerably outside the range of the majority of values are simply dropped from consideration. Using this information, write a C++ program that accepts up to 10 floating-point values from a user and determines and displays the average and standard deviation of the input values. All values more than four standard deviations away from the computed average are to be displayed and dropped from any further calculation, and a new average and standard deviation should be computed and displayed.
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }(Physics) Coulomb’s Law states that the force, F, acting between two electrically charged spheres is given by this formula: F=kq1q2r2 q1isthechargeonthefirstsphere.q2isthechargeonthesecondsphere.risthedistancebetweenthecentersofthetwospheres.kisaproportionalityconstant. Write an assignment statement to calculate the force, F.C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.
- C. In VB language 2.Write a program that accepts a single, 5 digit integer and out puts if the number is even or odd. 3.Take the above program and outputs a if the number is greater, less than or equal to 38000.C++ OOP Write a program that prompts the user to input a length expressed in centimeters.The program should then convert the length to inches (to the nearest inch) andoutput the length expressed in yards, feet, and inches, in that order. For example,suppose the input for centimeters is 312. To the nearest inch, 312 centimeters isequal to 123 inches. 123 inches would thus be output as:3 yard(s), 1 feet (foot), and 3 inch(es).Programing Language: C++ Your time machine is capable of going forward in time up to 24 hours. The machine is configured to jump ahead in minutes. To enter the proper number of minutes into your machine, you would like a program that can take a start time (in hours, minutes, and a Boolean indicating AM or PM) and a future time (in hours, minutes, and a Boolean indicating AM or PM) and calculate the difference in minutes between the start and future time. A time is specified in your program with three variables: int hours, minutes; bool isAM; // You can also use a char, i.e. A or P for example, to represent 11:50 PM, you would store: hours = 11,minutes = 50, isAM = false or if using a char, hours = 11,minutes = 50, isAM = 'A' This means that you need six variables to store a start and future time. Write a program that allows the user to enter a start time and a future time. Include a function named computeDifference that takes the six variables as parameters that represent the start…
- C program: The user should enter a number and then the next consecutive numbers are printed in. How would I approach this?Define the function: int power (int base, int exp); It accepts the arguments for base and exponent and returns power. The algorithm is to repeatedly multiply the value of the base to how many times the value of exponent. Test the function inside main(). Write the complete program. Use C language. For example: Input Result 2 5 32 3 4 81Write a main function that calls div (int x, int y); Write the code below. Use C++ programming language.