Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include "functions.h"
- void readForceValuesFromStdIn(double* leftTeam, double* rightTeam, unsigned const int noParticipants) {
- double inpt = 0;
- int left{0}, right{0};
- for (int i = 0; i < noParticipants; i++) {
- std::cin >> inpt;
- if (i%2) {
- leftTeam[left] = inpt;
- leftTeam++;
- } else if (!(i%2)) {
- rightTeam[right] = inpt;
- rightTeam++;
- }
- }
- }
- bool validForces(double* forces, int noParticipants) {
- for (int i = 0; i < noParticipants; i++) {
- if (forces[i] < 0) {
- return false;
- }
- }
- return true;
- }
- double calculateForce(const double* leftTeam, const double* rightTeam, unsigned const int noParticipants) {
- }
- void printWinnerToStdOut(const char* leftTeamName, const char* rightTeamName, const double netForce) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement