- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
I'm trying to write a basic program for a C++ lab for class, and running into some trouble. Senario is that the program averages grades. A user enters the number of grades, then enteres a letter grade, then the program runs for however many grades the user has, then averages … |
|
|
I have been reading about pointers, which IS confusing. I'm sure there is a purpose, but I don't know why I need them yet. For example [CODE] [COLOR=Red]var1 = 23;[/COLOR] [COLOR=Blue]// assigning 23 to var1[/COLOR] [COLOR=Red]var2 = var1; [/COLOR] [COLOR=Blue]// assigning the value of var1 to var2[/COLOR] [COLOR=Red]var3 = &var1;[/COLOR] … |
Write a program that uses while loops and performs the following Prompts the user to input 2 integers firstNum and secondNum // Easy Output all odd numbers between firstNum and secondNum // No idea how to start that. Outputs the sum of all even numbers between firstNum and secondNum Output … |
|
Hello, I had ran into a very difficult problem in my CS110 class in University. The problem asks us to use if statements to take 5 random inputted float numbers: ie. 5.63, 10.5, 16.7, 20.6 & 10.9 and take the median value, Ie the value that is in the middle. … |
|
When there are several cout statements, if the first cout statement has, say, << fixed << showpoint << setprecision(4), then all the subsequent cout statements *without* these settings will also have that effect. For example, in the following program, [CODE]cout << "sin(" << angle << ") = " << fixed … |
|
I just started my C++ course in college and I'm having major trouble I have to write a program that dispenses changes. It has to read the amount paid - amount purchased, and gives the change in dollars, dimes, etc I need some help with this because I am so … |
|
can any body convert this to switch statement thankxxxx.. [CODE=cplusplus] public char CheckDir(int row, int col, int selectedX, int selectedY) { if (row == selectedX) { if (col - selectedY == -2) { return 'd'; } //DOWNWARDS else if (selectedY + 2 == col) { return 'u'; } //UPWARDS } … |
|
Hi, I'm new in this forum and c language, need somebody to correct my programme as below: Question Design and implement an interactive program that reads your yearly gross salary and computes and prints your net monthly take home income. Assume that your yearly gross salary is greater than RM … |
|
i'm planning on creating a program for reservations (ex. rooms) by analyzing my problem,the things i don't know how to are: validating the date and whether the room inquired is available or reserved for someone else i'm guessing this will require me to create an output file,which i have no … |
|
A bank charges $10 per month plus the following check fees for a commercial checking account: $.10 each for less than 20 checks $.08 each for 20-39 cecks $.06 each for 40-59 checks $.04 each for 60 or more checks The bank also charges an extra $15 if the balance … |
|
Hi, Suppose I have a character array with the elements B,A,A. Now I have another character array with the elements A,B,B,B,A,A. How do I match the pattern B,A,A of the first character array with that of the second character array so as to produce the following output: A B B … |
|
help with c++ problem. a software company sells a package that retails for $99 . Quantity discounts are given according to this table. Quantity Discount 10-19 20% 20-49 30% 50-99 40% 100 or more 50% Write a program that asks for the number of units sold and computes the total … |
|
this would be my first time with arrays so i still have no idea how to use it i'm thinking on using it on this program [code=c++]#include <iostream> #include <conio.h> #include <string.h> using namespace std; int main() { char main_menu; char parts; char items[]; //here's the part i don't know … |
|
I have learned the basics of c++ and found out that different c++ compilers behave differently especially when it comes to errors. I would like the community to advice as to which compiler is the most popular and if it can be used with .net so that once I develop … |
|
When I compile and run my programs in Dev C++, the output window opens and shows the output. Then instanlty the window flashes and disappears. How do I make the window stay long enough for me to read the output?? Thanks |
|
You guys helped me a lot last time I posted so now that I have trouble i again turn to you :).Ok can someone tell me with what can I substitute the following code.It is supposed to get some lines and put them in strings. [code] system("cls"); string user,date,title,description; cout<<"Please … |
|
Introduction Reverend Zeller developed a formula for computing the day of the week on which a given date fell or will fall. Suppose that we let a, b, c and d be integers defined as follows: a = the number of the month of the year, with March = 1, … |
|
Hey guys, I just have a simple (?) question. What difference is there, if any, between [inlinecode]cin[/inlinecode] and [inlinecode]std::cin[/inlinecode] (for example)? If the latter is better form, why is it so? |
|
i would like to create a program that converts a number system to another i found few ideas on how to do this but lacks explanation so i can't figure out 'how it worked'. found that 'for loop' over the net,did some editing then applied it in a program. here's … |
|
here's my code: [code=c++]cin>>figure; switch (figure) { case '1': //figure is circle system("cls"); cout<<"input radius: "; cin>>rad; cout<<"\nsurface area of your circle is "<<pi*rad*rad; break; case '2': //figure is rectangle system("cls"); cout<<"input length: "; cin>>length; cout<<"\ninput width: "; cin>>width; cout<<"\nsurface area of your rectangle is "<<length*width; break; }[/code] 1)when i … |