I need help with this c++ code. This is my first computer science course. I have not learned arrays but I am learning vectors. I am also required to write this code without do loops or any other form of advanced coding technique. Please help me figure out this code using the basic coding techniques that you would find in an introduction to cs. Thank you for your help, I don't even know where to start :)
Please find the code below:::
#include <iostream>
using namespace std;
int main( )
{
//first number is total number of element
int numberOfElem;
//get the number
cin>>numberOfElem;
//creat list of number as array
int list[numberOfElem];
//store user input of array
for(int i=0;i<numberOfElem;i++){
cin>>list[i];
}
int lowerBound,upperBound;
//get last two bound value
cin>>lowerBound>>upperBound;
//loop for array
for(int i=0;i<numberOfElem;i++){
//if element in range print
it
if(list[i]>=lowerBound
&& list[i]<=upperBound){
cout<<list[i]<<" ";
}
}
return 0;
}
output:
I need help with this c++ code. This is my first computer science course. I have...
This is for my Computer Programming class using Visual Studio C++ This is a home work assignment and is for a grade so answer seriously and if you don't know know or unsure don't answer I need the coding so i can copy and paste and need a screen shot of the result i can copy as well Thank You. P1 – Merge two sorter arrays (80 points) (a) Write a function that receive two sorted arrays of integers and...
I need help with this problem for computer science, have had difficulties figuring out for loops, please help, sorry the pyramid is kinda messed up but it's supposed to be a pyramid Prog3d: Use for loops to construct a program that displays a pyramid of $ on the screen. The pyramid should look like this: [4] $ $$$ $$$$$ $$$$$$$ $$$$$$$$$ Note: There is no space in front of the first $ of last row. The above example shows only...
Can anyone help me with my homework assigment. Computer Science - Database Conceptes and Applications I added an image of instuctions on how the assingment needs to be done. Thank you for your efforts.
"Write a class that represents a course at Juniata. A course has a department (ex. CS, IT, PY, BI), a number (ex. 110, 240, 356), a name (ex. Computer Science 1), and a number of credits. Write a test driver just to make sure your class works. I recommend just instantiating a few courses and displaying them using the __str__ method. If you want to go a little farther, store a few courses in a list and loop through them...
Hello I need help turning my code into a GUI applicaiton please. What I have for code and the requirements are below. Please please help, I will be so greateful. This is my last assignment of my school and I'm just so burnt out mentally that I don't know where to start and my teacher is always to busy to help. Thank you so so so much! -----Code------ private void CalculateSC(ActionEvent event) { if(amount < 10){ chargeAmount = 1; }else...
Having trouble writing this code in C++. It asks to convert the for loops. I tried it myself but I don't think I am doing it right, please help fix. Edit: this is the whole question...It just asks to make the following changes to the for loops.. Question: Write and "convert" the i and j for loops as follows: * i must start at ilow, * i's for loop will terminate at ihigh, * j must start at jlow, *...
I am needing to code a coffee mug in OpenGL using c++. I have found the coding for a tea kettle but we have been told we cannot use a tea kettle. I have attached a photo for reference. Thank you for any help you can provide!
can someone please help me with my computer science homework. i am not sure if i am doing it correctly i would like your answer so i can compare with mine Create an ArrayList with the below state codes in it. AL AK AZ AR CA TX MA Once the ArrayList is created do below operations 1. Add the state PA in the ArrayList at the end 2. Search through the ArrayList and replace the state CA with FL 3....
Hello I'm a female in the computer science program. I need to do a research paper on business etiquette in a country i dont have any relationship with it. I want to do India. I need helped with anybody who is india or did business with any company in India. What rules i should follow special as an female in a world of man? Thank you for the help!!!
need Help! I don't even know where to start. if you could please show every step and maybe explain why you did it. thank you! 2. Provide reagents and intermediates. OEt Ph Ph Ph