Write code in c to output male if gender contains upper case

Assignment Help Electrical Engineering
Reference no: EM13269417

Given a char variable called gender, write C++ statements to output "Male" if gender contains upper or lower case M, "Female" if it contains upper or lower case F, or "Invalid Gender" if it contains anything else. Use if / else if statements.

Reference no: EM13269417

Questions Cloud

Design an elevator controller for simple two-floor elevator : Design an elevator controller for a simple two-floor elevator. On the 1st floor, there is only an up button, and on the 2nd floor, there is only a down button. Within the elevator, there are two buttons: door open and door close.
What was the most recent dividend per share paid : what was the most recent dividend per share paid on the stock? (Do not round intermediate calculations and round your answer to 2 decimal places. (e.g., 32.16)) Dividend paid per share $
Criticisms aimed at the advertising industry : Assess some of the criticisms aimed at the advertising industry. Determine whether or not advertisers create advertising copy in the best interests of society, giving a specific example.
Find out the empirical and molecular formulas : A compound containing only C, H, and O, was extracted from the bark of a sassafras tree. The combustion of 91.3 mg produced 248 mg of CO2 and 50.8 mg of H20. The molar mass of the compound was 162 g/mol. Determine its empirical and molecular formu..
Write code in c to output male if gender contains upper case : Given a char variable called gender, write C++ statements to output "Male" if gender contains upper or lower case M, "Female" if it contains upper or lower case F, or "Invalid Gender" if it contains anything else. Use if / else if statements.
How do people use language to style themselves : How do people use language to style themselves - to take on a particular persona or juggle between personae in interaction with others?
What is the gauge pressure on the bottom of the tube : A test tube standing vertically in a test tube rack contains 2.2 cm of oil, What is the gauge pressure on the bottom of the tube
Sensitive information about this organization confidential : Identify a health care organization with which you are familiar, and discuss working capital management and its revenue cycle as follows (be mindful to keep sensitive information about this organization confidential):
What is the required semi-annual payent : Immediately after the 4th payment at the end of the second year, interest rates have risen to 8% annually. You can earn that rate on funds already accumulated and the 16 future payents.

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Find the minimum sum-of-products

Find the minimum Sum-of-Products (SOP) expression for the following function using Quine.

  Define discrete sequence plot in matlab

Discrete sequence plot in Matlab, Consider the following formula, x[n] = x[n-1] + x[n-3] n>=3, find the rest of the sequence for 0

  What is expression for operator o in the bra-ket notation

Let O be a measurement operator for the of dots facing upwards on a 6-sided 'quantum' die-- a die that can be put into superpositions of states and then measured. The set of possible outcomes is {1,2,...6}.

  Determine the voltage range that would be converted to pcm

For a 12-bit linear PCM code with a resolution of 0.02 V, determine the voltage range that would be converted to the following PCM codes. (a) 1 0 0 0 0 0 0 0 0 0 0 1 (b) 0 0 0 0 0 0 0 0 0 0 0 0

  What is the change in the ions electric potential energy

A Na+ ion moves from inside a cell, where the electric potential is -70 mV , to outside the cell, where the potential is 0 V. What is the change in the ion's electric potential energy as it moves from inside to outside the cell

  What are the maximum and minimum values for the if

A 10 kHz signal modulates a 500 MHz carrier, with a modulation index of 2. What are the maximum and minimum values for the instantaneous frequency of the modulated signal

  What electrical code is universally used in the united state

Identify the type of cable that is permitted in single- and multifamily dwelling units but that cannot be used underground, nor in buildings that are more than three stories above grade, nor in commercial garages, motion picture studios, theaters,..

  Determine what is the value of the resistor

for a series RLC circuit shown, the input-output differential equation of interest is LC d^2 vl(t) /dt^2 + C dv l(t)/dt + vl(t) = LC d^2v(t)/dt^2 What is the Value of the Resistor

  Determine minimum l to ensure ccm operating mode

Given a buck-boost converter (with ideal components): 8 V. Vin 40 V.; Vo = 15 V. (regulated); C = 470 micro Farads; and fs = 20 KHz. (a) Determine minimum L to ensure CCM operating mode if Po 2 W.;

  Explain why then do even use jfets as amplifiers

Why then do we even use JFETs as amplifiers. What is it that make them attractive even though they are non-linear. How do we minimize the effect of their non-linearity

  How much work is done on the electron by the electric field

An electron is released from rest at a distance of 0.350 m from a large insulating sheet of charge that has uniform surface charge density 4.90×10^-12 C/m . A) How much work is done on the electron by the electric field of the sheet as the electron..

  Determine the number of quantization levels

Work out the following problem: If the analog signal to be quantized is a sinusoidal waveform, that is, x(t) = 6 sin (6283t), and if the bipolar quantizer uses 8 bits, determine 1. Number of quantization levels; 2. Step size of the quantizer ; 3. ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd