Germany has minimum marrying law in which if any person has age greater than 18 , they can marry. Your task is to write a program in which you have to take age from user and print statement according to above conditions. In Nim programming language
Q: Write a program that will check the employees years in service and office. • The user will input…
A: For writing the above code, we have used c++ language. Coding in the c++ is easy and efficient. It…
Q: -Write a program that asks the user to enter a person's age. The Problem 2: Age Classifier program…
A: EXPLANATION - In this program if and else condition is used to classify the age. First a variable…
Q: wtite a program c++ If the number is positive, add the number to the variable positivesum; else,…
A: //Including library#include <iostream>using namespace std;//Main of the codeint…
Q: Design and develop a simple program for the Air Force to label an aircraft as military of civilian.…
A: Introduction of Program: The C++ program takes speed as input from the user and then the program…
Q: Write a multiple assignment statement that can be used instead of the followinggroup of assignment…
A: GIVEN: Write a multiple assignment statement that can be used instead of the followinggroup of…
Q: Write a program that computes and assess the TF of the students in one semester, based on the given…
A: In the solution of given problem, first we read the tuition fees, then read the mode of payment…
Q: Engineering P4.4.1.9 A mass m is attached to the end of a rope of length r= 3 meters. The rope can…
A: Required: A mass m is attached to the end of a rope of length r = 3 meters. The rope can only be…
Q: Write a program to calculate electricity bill charged to a consumer. Ask him to enter the units…
A: Please find the answer below :
Q: Suppose that one of the biggest car sales companies promised you an offer. Therefore, they have…
A: #include <iostream>#include <string>#include <fstream>using namespace std; int…
Q: Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits.…
A: The solution to the given problem is below. **Note: As programing language is not mentioned in the…
Q: Write a program in C# that will ask the user to enter two double numbers. Use an if() statement to…
A: Program plan: Ask the user to enter the first number. Ask the user to enter the second number. Use…
Q: Write a program to help Buddy (the sheepdog) calculate the average age of all his sheep. The program…
A: Java is first published in 1995 by sun microsystems as a programming language and computing…
Q: Write program that takes two positive integer arguments and calculates the greatest common divisor…
A: Since no language is specified in the question. I am using c++ language to write the code. See…
Q: Write the program in C++ -Write a program that calculates and prints a cell phone bill. The company…
A: Answer. A C++ program that calculates and prints a cell phone bill, is as under:
Q: Write C# program for the following: Salman’s basic salary is input through the keyboard, his…
A: Lets see the solution.
Q: Write a program that request for two fertilizer name and their respective yields. Your program…
A: Since, programming language is not mentioned so I have used C++ programming language. Create a class…
Q: Write a program to ask user to enter his date of birth and calculate how many independence days…
A: #include <stdio.h> int main(){ int day, month, year; printf("Enter day, month(in number)…
Q: Write a C++ program. A software company sells a package that retails for $109. Quantity discounts…
A: To write a C++ program using the if/else if/else statement that asks for the number of units sold…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: A variable in a program is a named placeholder that can contain any integer value. The statement z +…
A: Below is the complete solution with explanation of the given question. The value of each iteration…
Q: An employee is paid on an hourly basis. Write a C-language program that accepts an employee's ID…
A: #include <stdio.h> int main(){ int id; float rate_per_hour; int num_hours;…
Q: Create a program using nested if else statement that would determine if the user is a voter for…
A: Input the age of user and initially check if age is less than or equal to 30 or not and then we are…
Q: Use your previous working Java program as a starting point (Project 3). Create another function that…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: In C++ (Find the number of days in a month) Write a program that prompts the user to enter the…
A: Answer: This is my answer: But the complier reported: 1. Compiler error : fatal error 2. #include 3.…
Q: Q) Write a program in C++ language that enter an integer number from keyboard then check the number…
A: The given problem can be solved using if-else if-else statement. First we need to read number, then…
Q: this is c program Write program that ask the user to enter int mark (0-100) for test Physics. Then…
A: Your C program is given below as you required with an output.
Q: The programming language is C++, write a program base on the given statement. Create a program…
A: 1. Input the Real Estate Value 2. If the value < 2,50,001, 1. tax = 5% of value 3. Else, if…
Q: Scenario: You have been tasked with writing a program that reads the total price of the items…
A: Note: As the language is not specified answer written in c++ Algorithm: 1)read the total price of…
Q: Write a program that takes your full name as input and displays the abbreviations of the first and…
A: Program code: #include <bits/stdc++.h>using namespace std; int main(){ string…
Q: Write a program that reads the marks of a student in the test (te), midterm (mid), assignment…
A: Code: #include<stdio.h> int main(){ int tm,mid,assig,fe,pm; printf("Enter…
Q: In C, the condition that will give a true statement when a number x is in the range of is 0 10 O x>0…
A:
Q: Write a program to display pet adoption information. The program must use if-else statements.
A: The code is completed in java. Run the java file and you will get the output.
Q: Write a program in which take a number from user and check whether it is palindrome or not using…
A: Conditional statements: Conditional statements are the block of code that execute only when a…
Q: Write a program which takes fuel type from user. If fuel type in not in the range of 1 to 3 then it…
A: Note: The given Program is in C++ programming language
Q: Write a program called CashRegister.cpp. The program should prompt the user for each item they are…
A: the c++ code is an given below : #include <iostream> #include <vector> using namespace…
Q: LANGUAGE MATLAB. Cows cost $10 each, sheep cost $1 each and 8 hens can be bought for $1. Write a…
A: Code: for c=1:100 %c represents no.of cows for s=1:100 %s represents no.of sheeps for…
Q: Write a program in C# that will ask user to input his age and determine if he or she is eligible for…
A: Please find the answer below :
Q: In C++ language, create a program that gets quarterly sales from a user, and calculates the total of…
A: - We need to code for the sales program.
Q: 1. Write a simple program to determine the credit card types according to annual income and user…
A: #include <iostream> using namespace std; int main(){ int inc,interest;…
Q: You are teacher at any school and student want to play a game.so you designed a name in which the…
A: Required:- You are a teacher at any school and students want to play a game. so you designed a game…
Q: Write a program that reads from a student his/her name and his/her ID whic program should display…
A: import java.util.Scanner;public class Main{ public static String getDay(int code){ // divide code…
Q: Write a program that calculates a weekly wage, based on an hourly payrate and how many hours were…
A: Answer:
Q: In coral language write two Get statements to get input values into monthBorn and yearBorn. Then…
A: Coral Language Coral language is a programming language which have similar programming structure as…
Q: rite a program for housing insurance using switch statement in C++.
A: Input : Enter insurance amount Output : Predict the type of insurance using switch case.
Q: Apply your knowledge of Computer Programming to solve the following problem: Write a complete…
A: printf("\nEnter Customer Type:\nM for member\nC for card holder\nL for lucky draw winner\nEnter…
Q: Use C++ programming language A customer in a store is purchasing five items. The prices of the…
A: Algorithm: Start Store the price of 5 items in p1,p2,p3,p4 and p5 variables Print p1,p2,p3,p4 and…
Q: The programming language is C++, write a program base on the given statement. Write a program that…
A: Note: Below is the required program in C++. Programming Approach: Defining necessary header files.…
Q: In Python Write a program that allows the user to type in a phrase and then outputs the acronym…
A: PROGRAM: #Defining the main() def main(): #Getting input from the user phrase =…
Q: C Write a program for user to check that it is able to vote or not. voting age must be 18 or above
A: Requirements :- C Write a program for user to check that it is able to vote or not. voting age must…
Germany has minimum marrying law in which if any person has age greater than 18 , they can marry. Your task is to write a program in which you have to take age from user and print statement according to above conditions.
In Nim
Step by step
Solved in 4 steps with 2 images
- Use Language: C Write a program that accepts a number and determines whether the number is positive or negative. If it is positive, display the message “Positive!”. Otherwise, display “Negative!”. #include<stdio.h>int main(void){ int num; scanf("%d", &num); if(num>=0) printf("Positive!"); else printf(“Negative!”);} -THIS is the given program but its wrong Example Input Result 5 Positive! -3 Negative!this is c program Write program that ask the user to enter int mark (0-100) for test Physics. Thencategorise the student based on the following grading system. Use else-if and switchstatements.Value output80-100 Gred A; Excellent60-79 Gred B; Very Good.40-59 Gred C;Good.0-39 Gred F;FailIn programming language C.Write a program to calculate electricity bill charged to a consumer. Ask him to enter the units consumed. For all units less than or equal to 200, each unit is to be charged at Rs. 2. If units>200 and <=400, first 200 units is to be charged at Rs. 2 and other units is charged at Rs. 4. Each unit more than 400 will be charged at Rs. 5.
- The programming language is C++, write a program base on the given statement. Write a program that examines the value of a variable called TEMP.Then display the following messages, depending on the valueassigned to TEMP. TEMPERATURE MESSAGE Less than 0 ICEBetween 0 and 100 WATERExceeds 100 STEAMThe programming language is C++, write a program base on the given statement. Create a program that will compute the real estate tax, given thefollowing formulas :a) If value of real estate is less than 250,001.00 tax is 5% of the realestate valueb) If value of real estate is b/w 250,001.00 to 500,000.00, tax is 10%of the real estate valuec) If more than 500,000 tax is 15% of the real estate valueLANGUAGE MATLAB. Cows cost $10 each, sheep cost $1 each and 8 hens can be bought for $1. Write a program which will buy exactly 100 animals for exactly $100 containing all three types (not just 100 sheep!).
- You are teacher at any school and student want to play a game.so you designed a name in which the one student write something on the board and other student same thing as done by first student. Then this will win the game and print hurray. Else print oops. You have to write the program in c++Write an application that inputs three integers from the user and displays the sum, average, product, smallest, and largest of the numbers. [Note: The calculation of the average should result in an integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333….] For C# programmingIn programming language C. Write a program to ask user to enter his date of birth and calculate how many independence days (15th August) have he seen in his life. Also discuss the difference between / and % operators
- this is a C++ question, not Python or Java Write a C++ program. A software company sells a package that retails for $109. Quantity discounts are givenaccording to the following table. Quantity Discount 10 - 39 10% 40 - 65 18% 66 - 90 27% 91 - 120 35% 121 – 199 42% 200 or more 48% Write a program using the if/else if/else statement that asks for the number of units soldand computes the total cost of the purchase and the savings due to the discountapplied. The program should also display the number of units purchased and thediscount in percentage. The output should include the following text:Number of units purchased is:Discount applied is:Total savings due to discount is:The total cost of the purchase is:Do NOT use the switch statement, any logical operator or anything that looks likeone in the program. You will not receive credit for the program if you do.IN C LANGUAGE USING LADDERIZED IF-ELSE Create a program that will calculate Body Mass Index (BMI) and will indicate the status of your BMI. Using ladderized if-else. BMI = ([Weight in Pounds) / (Height in inches) x (Height in inches)] x 703 BMI = (Weight in Kilograms) / (Height in meters) x (Height in meters) Your program must accept weight in pounds or kilogram, and height in inches or meters. Formula: 1 ft = 12 inches 1 meter = 39.3701 iches 1 in = 0.0254 m 1 kg = 2.2 lb 1 lb = 0.454 kg BMI Categories: Underweight = <18.5 Normal weight = 18.5 - 24.9 Overweight = 25 - 29.9 Obesity = BMI of 30 or greater Sample Program: Weight (Input 1 for Lb, input 2 for kg): 1 Input weight in Lb: 220 Height (Input 1 for inches, input 2 for meters): 2 Input height in meters: 2 Your BMI is: 24.9 BMI Category: NORMAL WEIGHTIn C++ Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan. The tax rates are as follows: If the taxable income is: Between $0 and $15,000, the tax rate is 15%.Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000.Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000. Prompt the user to enter the following information:Marital statusIf the marital status is “married,” ask for the number of children under the age of 14Gross salary (If the marital status is “married” and both spouses have income, enter the combined salary.)Percentage of gross income contributed to a pension fund Your program must consist of at least the following functions:Function getData: This function asks the user to enter the…