Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #3K
~41.1K People Reached
Favorite Forums
Favorite Tags
c++ x 55
Member Avatar for badkid32

this one works for me: [CODE=c++]cout<<"Enter number of grade input: "; cin>>numgrade; for (int x=0;x<numgrade;x++) { cout<<"Enter a grade in letter format: "; cin>>usergrade; switch (usergrade) { case 'A': totalgrade+=4; break; //and so on...[/CODE]

Member Avatar for Xavier_3
0
11K
Member Avatar for Geek-Master

since i do not have any knowledge yet about these pointers,i want to ask questions i don't have my source code with me now because i did that at school i did something like this: [CODE=c++]char* color; //then i have these case statements //what i wanted was when a case …

Member Avatar for new programer
0
487
Member Avatar for Exo1337

[QUOTE]Output the numbers and their squares between 1 and 10[/QUOTE] here's a way you can do this: [CODE=c++] int x=1; cout<<"Squares of numbers between 1-10"<<endl<<endl; while(x<=10) { cout<<"Square of "<<x<<" is "<<x*x<<endl; x++; }[/CODE] please analyze the code so you yourself could learn.

Member Avatar for carnage
0
208
Member Avatar for hockeyplayer051

since you do know that only 5 random numbers will be the input try using arrays after declaring float num1,num2...num5 then have something like [code=c++] float numbers[5]; float temp1; float temp2; int x; int y; numbers[0] = num1; numbers[1] = num2; numbers[2] = num3; numbers[3] = num4; numbers[4] = num5; …

Member Avatar for Ancient Dragon
0
93
Member Avatar for sgw

try removing fixed and showpoint [code=c++]cout << "sin(" << angle << ") = " << setprecision(4) << sin(angle) << endl; cout << angle;[/code]

Member Avatar for sgw
0
13K
Member Avatar for Trini89

[QUOTE]amount_purchased-amount_payed = difference;[/QUOTE] assignments should be done like this: [code=c++] difference = amount_purchased-amount_payed;[/code]

Member Avatar for Lerner
0
92
Member Avatar for austinslik

[code=c++]row - selectedX = 2;[/code] first off,you're lacking an equal sign if you are trying to compare values that part is having an error because you used the assignment(=) operator assignments should be like this: variable_being_assigned = value_to_be_assigned secondly i don't quite get your problem with your if statements,the u,d,l,r …

Member Avatar for austinslik
0
131
Member Avatar for SofMy

[QUOTE] netincome = yearlygross-totaldeduction/12;[/QUOTE] that should be netincome=(yearlygross-totaldeduction)/12;

Member Avatar for mitrmkar
0
121
Member Avatar for carnage

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 …

Member Avatar for hammerhead
0
142
Member Avatar for micah1983

don't forget to put semicolons after statements anyway, for the additional $15 if balance is < $400 [code=c++] if (begbal<400) total_bank_fees += 15;[/code] equation for check fees: [code=c++] total_check_fees = ppch * checkw;[/code] then just add everything [code=c++] total_bank_fees += total_check_fees;[/code] use do while for the validation of balance [code=c++] …

Member Avatar for carnage
0
116
Member Avatar for rsk8332
Member Avatar for micah1983

[code=c++] tot_cost=pprice*quantity; if (quantity >= 10 && quantity <= 19) { discount = tot_cost * .2; /*percent to decimal conversion: 20%/100% = .2*/ discounted_cost = tot_cost - discount; } [/code]

Member Avatar for carnage
0
595
Member Avatar for carnage

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 …

Member Avatar for carnage
0
131
Member Avatar for vishalkhialani

[URL="http://www.bloodshed.net/devcpp.html"]Dev-C++[/URL] for me. you might want to try [URL="http://www.microsoft.com/express/vc/"]MS visualC++ 2008 express[/URL] haven't tried it yet though.

Member Avatar for vijayan121
1
179
Member Avatar for kartik14

here at home i'm using dev c++ and i do get the same "problem" i use system("pause") which i think is not preferred by others,but it's just me using it to see the output then i just remove it when i'm at school because there we use visual c++ OR …

Member Avatar for Duoas
1
13K
Member Avatar for tedobg

what do you mean in this part? [quote]The problem that really drives me crazy is that this code works perfectly when I compile it separately but when I try to put in my main program,instead of writing "Please Enter Date:" then letting me type and then writing "Please Enter Title:" …

Member Avatar for carnage
0
104
Member Avatar for ShyamalShah

just an off-topic thought though [QUOTE]For example, July 31, 1929 gives a = 5, b = 31, c = 29, d = 19; January 3, 1988 gives a = 11, b = 3, c = 87, d = 19. Now calculate the following integer quantities:[/QUOTE] shouldn't the century be 20?

Member Avatar for neosomosis
0
110
Member Avatar for IIMarckus

i was about to ask this question too so what's the proper way? i always do declare globally this one [code=c++]using namespace std;[/code] should i just declare this one globally instead (if i'm using it) using std::cin; using std::cout;

Member Avatar for IIMarckus
0
137
Member Avatar for carnage

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 …

Member Avatar for Narue
-1
2K
Member Avatar for carnage

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 …

Member Avatar for carnage
0
233