Questions: 9 913

Answers by our Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

write c++ programm to swap first and last element of an integer 1-D array


Write a program that uses for loops to perform the following steps:

  1. Prompt the user to input two integers: firstNum and secondNum
  • (firstNum must be less than secondNum).
  1. Output all odd numbers between firstNum and secondNum.
  2. Output the sum of all even numbers between firstNum and secondNum.
  3. Output the numbers and their squares between 1 and 10.
  • Separate the numbers using any amount of spaces.
  1. Output the sum of the square of the odd numbers between firstNum and secondNum.
  2. Output all uppercase letters.

Write a program that uses do...while loops to perform the following steps:

  1. Prompt the user to input two integers: firstNum and secondNum
  • (firstNum must be less than secondNum).
  1. Output all odd numbers between firstNum and secondNum.
  2. Output the sum of all even numbers between firstNum and secondNum.
  3. Output the numbers and their squares between 1 and 10.
  • Separate the numbers by any amount of spaces.
  1. Output the sum of the square of the odd numbers between firstNum and secondNum.
  2. Output all uppercase letters.

The population of town A is less than the population of town B. However, the population of town A is growing faster than the population of town B.

Write a program that prompts the user to enter:

  1. The population of town A
  2. The population of town B
  3. The growth rate of town A
  4. The growth rate of town B

The program outputs:

  1. After how many years the population of town A will be greater than or equal to the population of town B
  2. The populations of both the towns at that time.

(A sample input is: Population of town A = 5,000, growth rate of town A = 4%, population of town B = 8,000, and growth rate of town B = 2%.)


The population of town A is less than the population of town B. However, the population of town A is growing faster than the population of town B.

Write a program that prompts the user to enter:

  1. The population of town A
  2. The population of town B
  3. The growth rate of town A
  4. The growth rate of town B

The program outputs:

  1. After how many years the population of town A will be greater than or equal to the population of town B
  2. The populations of both the towns at that time.

(A sample input is: Population of town A = 5,000, growth rate of town A = 4%, population of town B = 8,000, and growth rate of town B = 2%.)


Create a program that will display a different output based on the user input. If the user entered a number more than 50, it will display "The number is greater than 50". Otherwise, it will display "The number is lesser than what I expected."

How to implement this using vector



#ifndef __ROCKPAPERSCISSOR_H__


#define __ROCKPAPERSCISSOR_H__



enum ObjectType { ROCK, PAPER, SCISSOR };



void displayRules();



ObjectType retrievePlay(char selection);



bool validSelection(char selection);



void convertEnum(ObjectType object);



ObjectType winningObject(ObjectType player, ObjectType computer);



void gameResult(ObjectType player, ObjectType computer, int &winner);



void displayResults(int g_count, int w_count1, int w_count2);



#endif



For you to be allow to participate in on going convocation,you must have meet up with the school criteria and completed your registration. If any of these conditions are not met , you can not be eligible to graduate with the present graduating students. Write a c++ program for the automation of this system

Pls help me to implement this program





#include <iostream>



using namespace





struct NameType



{





string first;



string middle;



string last;





};





struct AddressType



{





string address1;



string address2;



string city;



string state;



string zip;





};





struct DateType



{





int month;



int day;



int year;





};





struct ContactType



{





string phone;



string cellphone;



string fax;



string pager;



string email;





};





struct EmployeeType



{





NameType name;



string emp_id;



AddressType address;



DateType hireDate;



DateType quitDate;



ContactType contact;





};




Write a two dimensional arrays that searches a number and

display the number of times it occurs on the list of 12 input

values.

Sample input/output dialogue:

Enter twelve numbers:

15 20 12 30 35 40 16 18 20 18 20

Enter a number to search: 20

Occurrence(s): 3


LATEST TUTORIALS
APPROVED BY CLIENTS