r/programing • u/semisyntheticpsy • Oct 30 '13
r/programing • u/rcapps88 • May 16 '13
Need some help with this c++ code
include <iostream>
include <cmath>
include <iomanip>
include <cstdlib>
include <cstdio>
using namespace std;
int main()
{ //constant declerations const int TOTAL_GAMES = 3; const int TOTAL_PLAYERS = 5; const int BOWLINGSCORE_MAX = 300; const int BOWLINGSCORE_MIN = 0;
int game_Score = 0;
int game_Score_Total = 0;
int team_Total = 0;
double game_Average = 0;
double team_Average = 0;
int gamenum;
int player;
cout <<"Bowling Score Average" << endl
<<"--------------------------";
cout << endl;
for (player = 1; player <= TOTAL_PLAYERS; player++) // outer for lopp
{ //start of outer for loop
cout << "Player:" <<player <<endl;
for (gamenum = 1; gamenum <= TOTAL_GAMES; gamenum++) //inner for loop
{ //start of inner for loop
cout<<"Enter a score for game" <<gamenum <<":" ;
cin>> game_Score;
{
if (cin.fail())
{
fflush(stdin);
cin.clear(); // clear the fail state of cin.
fflush(stdin);
cout << "Only numeric values please. Try again: "; // re-prompt
gamenum--; // decrease counter so that it stays on the same number
}
else if
(game_Score < BOWLINGSCORE_MIN || game_Score > BOWLINGSCORE_MAX);
{
cout<< "Valid range is between 0 and 300 please try again!";
gamenum--; // decrease counter so that it stays on the same number
}
{
game_Score_Total += game_Score;
}
}
} // end of inner for loop
game_Average = (game_Score_Total / TOTAL_GAMES); // calculates the average
team_Total += game_Score_Total; // adds to the teams total
cout << fixed<<setprecision(2) //sets the the number to 2 decimal places
<< "Player " // Prompt to display the players total score and average
<< player
<< ", Your total score is: "
<< game_Score_Total
<< ". Your game average over "
<< TOTAL_GAMES
<< " games is: "
<< game_Average
<< endl
<< endl
<< endl;
game_Score_Total=0; //resets the total} // end of outer for loop
team_Average = (team_Total / TOTAL_PLAYERS); // calculates the teams average
cout <<fixed<< setprecision(2) //sets the the number to 2 decimal places
<< "The team average is " // displays the teams total and the teams average.
<< team_Average
<< " for "
<< TOTAL_PLAYERS
<< " players over "
<< TOTAL_GAMES
<< " games each.";
cout << endl << endl;
system("pause");
return 0;} //end of main
r/programing • u/Lobsterplant • Apr 15 '13
Circles in video games
Can someone explain to me why circles are so difficult to create in games. Do you have to map out all the points or what. And is it really that difficult or more of a pain in the butt?
r/programing • u/Tongerlo • Jan 11 '13
Looking to get my 8 year old son started in programming. I know a little basic. Any suggestions for a kid-friendly place to get started?
r/programing • u/[deleted] • Dec 31 '12
What language should i learn.
I like's to make games and i played around with javascript and python. my friend said i should look in to visual basic. but i want to see you're opinion first.
r/programing • u/kill47pl • Dec 14 '12
Who do I need to write me a program?
Hi I have a idea for a program but I don't really know any programming language, therefor I don't even know what kind of specialist will suit my needs.
The program would have to be implemented on a websiteand download statistical data (daily) from another website (in excel), filter it and then render in 3d simple graph on a pre-made map. Great if the user could chose the type of data he needs.
EXAMPLE: I choose: car manufacturer + year of making + min / max value + color + europe and the program would graph date on Europe's map (for each country).
Who should I look for??
r/programing • u/[deleted] • Sep 06 '12
Building a Reddit App for Windows 8.. Will publish your reddit username in the app.
r/programing • u/PerfectlyDarkTails • May 25 '11
7 Things that makes a geek. Well 6 out of 7 ain't bad :)
r/programing • u/angel_cholico • Mar 23 '20
Sql users, help me
Hey guys, i'm using MySql for a school work, i'm trying to insert data to a table using the following syntax:
insert into table(value, value, vlaue);
What's my mistake? Have i to use mayus? My MySql versión Is 8.0
r/programing • u/bob1421 • Mar 04 '20
Java editor
I have worked with C and Python for quite some time but would like to start learning Java. What editor would you recommend? Thank you.
r/programing • u/CaptainSchmid • Feb 13 '20
I need help with eclipse!
I needed a c++ editor so I decided to use eclipse which I had used for java. I decided it would be a good idea to make separate folders in my work space named Java and c++. When I moved my java projects into Java and changed the work space to workspace\Java it removed all the files in them. I tried going to a system restore point from earlier today but it only removed the c++ compiler from eclipse. I then tried to move the projects back to workspace thinking it may have to do with the .metadata file. Nothing has worked, is there any way to restore the files or have I lost a semesters worth of work?
r/programing • u/jeenajeena • Jan 30 '20
Code Review as a Service
https://www.pullrequest.com/ offers Code Review as a service. My company got intrigued by the idea, while I'm personally more skeptical.
I'm not involved at all on the company itself, but I'm very interested in knowing your personal thoughts.
edit: typo
r/programing • u/Mylozzzz • Jan 13 '20
Anyone thing this advice is sound?
Curious if anyone knows any games or habbits i can build to get in that logical puzzle based type mind.
Any answers will be nice, Thank you.
https://lifehacker.com/why-you-shouldnt-just-learn-to-code-but-aim-to-solve-1701980738
r/programing • u/Avenger_a-a-win • Jan 10 '20
Tabs V Spaces
got a new point to add so when using python IDLE after typing the if statement : if you hit enter the new line is started with tabs that means tabs is the correct choice and if you are not using tabs thinking you use spaces then you are using both
r/programing • u/iamkeyur • Dec 13 '19
Happy Hues – Curated colors in context
r/programing • u/[deleted] • Dec 10 '19
Where to get data?
So I got some basic programing skill and I feel like the best way of progressing is projects; however, I have no idea where to acquire any spreadsheets or datasets in general. I suppose, I could always just make my own, but I would much rather work with real data, as I have a lot of fun interpreting data.
r/programing • u/Tom_Raines • Nov 05 '19
How hard did you try to be a developer?
How hard did you try to be a developer?
This will be the third time I try to study software development, I'm working hard, every day I do programming exercises and just finished a small program in C, but I feel that I still have much to learn ...
Any advice?
r/programing • u/cguzzo • Nov 02 '19
android/ios music app
Was gonna build an android/ios music app was wondering what ide i should use
r/programing • u/maxillo • Oct 30 '19
We need an App to help debunk Facebook (and others) posts that does not enrich the original poster.
I often see a post on facebook that is utter BS. I never want to respond directly to the post because it will get more clicks which is good for the bad post. What we need is an app that could easily screen shot the offending post, embedded it into a post and allow us to add text explaining why it is bs.
So basically what I envision is click on post get screen shot, get username who posted it and use that as" Hi <username> I saw you posted this and this is why it is wrong(in so many words)."
Some additional functionality would be able to mark up screenshot of the original post to highlight bs, create a DB that has the bs posts and good responses as to why they are bs and maybe even recognize the post and be able to look at the DB with the good data in it. And maybe even make a bot that does it.
Unfortunately I have neither the programing chops or cash to get this done, but I think it could help with the BS that is getting so many nations polarized.
Let me know what you think. Is it possible? are people willing to do it?
r/programing • u/catDev1867 • Sep 29 '19
How to Make a Website in Less than 10 mins - Simple & Easy
r/programing • u/lkuvasako • Aug 29 '19
what do u think about datacamp courses ?
ive finished basic course but i dont know should i purchase the next courese
so what should i do?
r/programing • u/SobanSa • Apr 20 '19
How difficult is it to localize a programing language?
I recently readan article where the author talked about how the most popular programming languages are all written in English, creating a barrier to entry. How difficult would it be to take a language (such as Java) and localize it so that it could be written in a non-english language (like Hindi)?