Write a c++ program to find;
(I). the perimeter of rectangle.
(ii). the circumference of a circle.
Note;
(1). all the programs must allow the user to make his input .
(2).both programs must have both comment using the single line comment or the multiple line comment to give description to both programs.
Silver Express Theme Park Pvt Ltd is a tourist attraction that offers three types of tickets.
1. Regular adult tickets at R30 per person.
2. Student tickets at R25 per person
3. Family ticket for two adults and two children is R75, with an additional R15 for each child beyond two children
Design a c++ application that will so the following:
a. The program should display a menu with three options.
b. The program should ask the user to select type of tickets needed. If the first or second options are selected, the program should ask the user to enter the number of people in the group. However, if the third option is selected, the program should ask the user to enter the number of additional children in the group.
c. The program should then calculate the total amount due and display it on screen
d. Make sure the user cannot select invalid options in the menu and that the number of people in the group is always greater than 0
Write code to in the form of function to delete a sub-tree of general tree whose parent node is p
you have been an integer array A of size N.you need to pfint the number with the value closest to zero.if there are multiple elements print the number with greater value.
Using the function findSquare() that receives an input and returns the square of the input, write a complete program that calculates and displays the squares of the integers from 1 to 50.
c++ programming.
Write a C++ Program to illustrate default constructor, parameterized constructor and copy constructors.
Write a program to read the data from babynames2012.txt and
1-
Print out on another files “top_common_10 names.txt” the top ten popular boys and
girls names.
2-
Print out on another files “least common_10 names.txt” the least ten popular boys
and girls names
In the text file, there are more than 100 baby names but I cannot copy and paste it all because of the word limit. Here is 50 of them.
1 J1 Jacob Sophia
2 Mason Emma
3 Ethan Isabella
4 Noah Olivia
5 William Ava
6 Liam Emily
7 Jayden Abigail
8 Michael Mia
9 Alexander Madison
10 Aiden Elizabeth
11 Daniel Chloe
12 Matthew Ella
13 Elijah Avery
14 James Addison
15 Anthony Aubrey
16 Benjamin Lily
17 Joshua Natalie
18 Andrew Sofia
19 David Charlotte
20 Joseph Zoey
21 Logan Grace
22 Jackson Hannah
23 Christopher Amelia
24 Gabriel Harper
25 Samuel Lillian
26 Ryan Samantha
27 Lucas Evelyn
28 John Victoria
29 Nathan Brooklyn
30 Isaac ZoeComplete Program.
int word_count(ifstream &in ); // return the number of words in text 1
int character_count(ifstream &in); // return the number of characters
#include "stdafx.h"
#include <iostream>
# include <string>
# include<fstream>
using namespace std;
int main()
{ ifstream in; in.open(“text1.txt”);
cout<< “number of words”<< word_count(in )<<endl;
cout<< “number of characters”<<character_count(in)<<endl;
in.close( );
}
Write a program that takes input from rawdata1.txt and writes a neat list of output to the screen
and to neat1.txt. Formatting instructions are used to create a neater layout: Numbers are written
one per line in a field width of 10. Each number is written with 3 digits after the decimal point.
Each number is written with a plus or minus sign. Write a function make_neat1 to format the
following text Uses “ 2345.45667 -0.0000456 34.9999 0.006788 -1 234
Silver Express Theme Park Pvt Ltd is a tourist attraction that offers three types of tickets.
1. Regular adult tickets at R30 per person.
2. Student tickets at R25 per person
3. Family ticket for two adults and two children is R75, with an additional R15 for each child beyond two children
Design a c++ application that will so the following:
a. The program should display a menu with three options.
b. The program should ask the user to select type of tickets needed. If the first or second options are selected, the program should ask the user to enter the number of people in the group. However, if the third option is selected, the program should ask the user to enter the number of additional children in the group.
c. The program should then calculate the total amount due and display it on screen
d. Make sure the user cannot select invalid options in the menu and that the number of people in the group is always greater than 0