
please solve it before 11:15 today
Subject :C++ programming
#include<iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int arr[10],count=0,n;
for(int i=0;i<10;i++)
{
arr[i]=(0+ rand() % 9+0) ;
}
cout<<"The Generated Numbers are : \n";
for(int i=0;i<10;i++)
{
cout<<arr[i]<<" ";
}
do{
cout<<"\nEnter an integer : ";
cin>>n;
}while(n<0 || n>10);
for(int i=0;i<10;i++)
{
if(arr[i]==n)
count++;
}
cout<<n<<" Appears "<<count<<" times in the array .";
}
2-
#include<iostream>
using namespace std;
int main( )
{
char arr[100];
cout << "Enter a string: ";
cin.getline(arr,100);
int count = 0;
for(int i = 0; arr[i] != '\0'; i++)
{
if (arr[i] == ' ') //Checking for spaces
{
count++;
}
}
cout << "The number of words = " << count+1 << endl;
return 0;
}

please solve it before 11:15 today Subject :C++ programming - Lab_9_Sec 51.pdf 1411113: Programming for Engineers...
Programming language C Please go through this carefully. Needs function void add(int *a1, int n, int *a2) Write a program addition.c that reads in an array (a1) of numbers, and creates a new array (a2) of numbers such that the first and last numbers of a1 are added and stored as the first number, the second and second-to-last numbers are added and stored as the second number, and so on. You need to check for even and odd length of...
please use c++
please write down the input file information
please add comments for some codes
please do not use #include <bits/stdc++.h> we did not
learn it yet
thank you
CSIT 575-Take Home Lab #11: Arrays To learn to code, compile and run a program processing characters. Assignment Plan and code a top-down modular program utilizing ARRAYS to solve the following problem, using at least 3 functions (called from the main() section or from another function) to solve the problem....
In
c++ programming, can you please edit this program to meet these
requirements:
The program that needs editing:
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
int cal_avg(char* filenumbers, int n){
int a = 0;
int number[100];
ifstream filein(filenumbers);
if (!filein) {
cout << "Please enter a a correct file to read in the
numbers from";
}
while (!filein.eof()) {
filein >> number[a];
a++;
}
int total = number[0];
for (a = 0; a < n; a++) {...
Detecting Substrings (C++ Version) Introduction A very common task that is often performed by programs that work with text files is the problem of locating a specific substring within the file. I am sure we’ve all done this many times when working with Word, Notepad, or other editors. Since we don’t have a GUI or other means of displaying the contents of a file all at once, let’s modify the problem slightly. Rather than locating a specific substring within a...
Help with programming in C++
Phase 1 is complete, please help with phase 2. Thank you.
Phase 1
You must design 3 algorithms, and provide
both a flow chart and pseudo code for the
algorithms.
Algorithm descriptions:
Given an integer parameter named current_number
and two constant global variables:
const int MIN_NUMBER = 1;
const int MAX_NUMBER = 8;
Create an algorithm named forward, that will
advance ONE value through a sequence of numbers 1,
2, 3 ... MAX_NUMBER. In...
using C geany. Please Dr. exercise # 1 and 2
During the lab: PART I: PROGRAMMING EXERCISES a. Using Geany, write a C program that prompts and asks the user for two assignment marks (al and a2) and two test marks (ti and t2). All four variables are integer variables and are in % (out of 100). You program should display the four marks properly lalebed to check if the input has been successful. b. Next, calculate and display the...
I need help with this assignment in C++,
please!
*** The instructions and programming style details
are crucial for this assignment!
Goal: Your assignment is to write a C+ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, I'O manipulators, and the string class. File format: Here is an example of a file...
In this lab, you will need to implement the following functions
in Text ADT with C++ language(Not C#, Not Java
please!):
PS: The program I'm using is Visual Studio just to be aware of
the format. And I have provided all informations already! Please
finish step 1, 2, 3, 4. Code is the correct format of C++ code.
a. Constructors and operator =
b. Destructor
c. Text operations (length, subscript, clear)
1. Implement the aforementioned operations in the Text ADT...
C PROGRAMMING Introduction In this part, you will solve a problem described in English. Although you may discuss ideas with your classmates, etc., everyone must write and submit their own version of the program. Do NOT use anyone else’s code, as this will result in a zero for you and the other person! Shipping Calculator Speedy Shipping Company will ship your package based on the weight and how far you are sending the package, which can be anywhere in the...
18.1 Lab Lesson 11 (Part 1 of 1) Part of lab lesson 11 There in one part to lab lesson 11. The entire lab will be worth 100 points. Lab lesson 11 part 1 is worth 100 points For part 1 you will have 80 points if you enter the program and successfully run the program tests. An additional 20 points will be based on the style and formatting of your C++ code. Style points The 20 points for coding...