241 Topics
|
|
I need to write a program for class that calculates student averages and quiz averagages. It has to read a 2-dim array from a file that looks like this: 10 10 10 2 0 1 8 6 9 8 4 10 The four students are the rows and the three … |
|
Hi, I'm writing a program for structural engineers that consists of a number of inherited classes. Specifically, I have a main() file which includes a class [I]element[/I] which includes a class [I]node[/I] which includes a class [I]matrix[/I]. [I]element[/I] includes variables of type [I]matrix[/I] and [I]node[/I], and [I]node[/I] includes variables of … |
|
Evening Everyone: I'm a bit of a newie with C++, and can't determine where to "declare" the functions in the following code. The compiler is stating I haven't defined the functions, but I've followed the instructors directions, and am now stuck. YAY! Thanks so much! #include <iostream> using namespace std; … |
|
In this program i am trying to find numbers that are multiples of 7,11, or 13, also if the total of the numbers is even or odd also the square root value of each number also if there are any prime numbers in the list [CODE]#include<iostream> #include<iomanip> #include<fstream> #include<cmath> #include<conio.h> … |
|
[CODE] // Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <vector> #include <algorithm> using namespace std; //Functions void welcome(); void instructions(); int game(string sofar, const string THE_WORD, int MAX_WRONG, int wrong, string used); // Types and Arrays string choice; string inst; const int MAX_WRONG … |
|
Hey i'm [B]trying[/B] to write code for a word utility program for a uni project and it is bugging the hell out of me. [CODE]#include <stdio.h> #include <string> #include <iostream> #include <fstream> #include <Windows.h> #include <string.h> #include <cctype> #include <algorithm> #include <vector> using namespace std; const int size=300; int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,i1,option,Mirrorimage,spacenumber=0,characternumber=0,averagelength=0,Uppercase; … |
|
I have an installer application I am building in javafx but I can't figure out how to get the operating system it is running on so I can place files in the right locations for each system and so I can customize the interface for each. If anyone has any … |
|
I've been trying the last few days to get this code to work but it still wont return the exact numbers. Its always atleast like 10 characters off and it probably is a trivial answer but I cant find the solution. I've initialized the charCount to 0 but still it … |
|
I need to be able to loop and get information for up to 10 "BankAccount" arrays, but when I use less than 10 it gives me garbage and I don't know how to fix it. Here is my Code. [CODE]#include <iostream> #include <iomanip> using namespace std; class BankAccount { private: … |
|
Hi everybody, i cant seem to make my program to pass the first user input. I know i have to put it inside a do while loop, but everyone of my attempts results in an infinite loop. I'm also aware that i should use a bool to make it work, … |
|
[code] <%! public String haversine(String lat1,String lon1,String lat2,String lon2) { int r = 6371; String val=null; double dlat=((Double.parseDouble(lat2))-(Double.parseDouble(lat1))); double dlon=((Double.parseDouble(lon2))-(Double.parseDouble(lon1))); double a = (Math.sin(dlat/2)*Math.sin(dlat/2))+(Math.cos(Double.parseDouble(lat1))*(Math.PI/180))*(Math.cos(Double.parseDouble(lat2))*(Math.PI/180))*(Math.sin(dlon/2)*Math.sin(dlon/2)); double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); double d = r * c; if(d>1) val= ((d)) +"km"; else if(d < =1) val = ((d*1000)) +"m"; return … |
|
The exercise tells me to find the error in this code [CODE] int g() { cout << "Inside function g" << endl; int h() { cout << "Inside function h" << endl; } } [/CODE] The listed error is that function h should not be defined inside of function g. … |
|
I am trying to learn C++ by myself using a book and want to work through everything it says. I am on a program that you have to write kinda like a cash register program that tells you how many 5's, 1's, quarters, dimes, nickles, and pennies you should get … |
|
I need help figuring out how to write a program with recursive functions in order to identify the path to a given maze. The maze is read in from a file and then when the path is found the maze is printed with the path shown. The read in maze … |
|
So this is my original code. [CODE] import random hints = {"python" : "A program", "jumble" : "The act of mixing up", "easy" : "Facil is to Spanish as ____ is to English", "difficult" : "Not eaay, but ____", "answer" : "To ____ a question.", "xylophone" : "An instrument. Also … |
|
Hi ~ As you can see from the code below I am in school for programming. I have come across this homework assignment a few times on the site already however the requirements for mine are different. I cannot use arrays. Three functions - I only have two coded. The … |
|
hi masters.. How to code the Copy, Cut and Paste functionality in VB 6.0 ? |
|
I'm a beginner c++ programmer. I use Win XP and CodeBlocks. I'm trying to make a pong game, I already have the controls programmed, but I need a method to do the following: Check for user input, if they don't input for x milliseconds, then continue with the loop so … |
|
i'm trying to make a password system for my program. a user will input upto 20 chars, and if the password is correct, load the main program and if not, loop until the user gives up or enters the correct answer. here is the code [CODE] void Password(char pass); int … |
|
The question is as follows: Write a program to read in a word that is up to 10 characters long. See if any 3 consecutive characters in the word are found somewhere else within the word. If they are, echo those characters to the screen. For example, if the word … |
|
i am trying to move the node in the first item from the list and add it to the back of the list 1->2->3 becames 2->3->1 instead i get 3 1 2 [CODE] #include <iostream> using namespace std; struct nodeType { int info; nodeType *link; }; void createList(nodeType*& first, nodeType*& … |
|
Hello everyone, I am trying to loop the entire "main" function, yet for some reason it only loops the termlength_determine() function and then jumps to the 'askloop_function'. i only need it to loop the entire 'main' function [CODE] //This program calculates the user's pay. #include <iostream> using namespace std; //::integer … |
|
What I'm trying to do is take an array that I created and look for key abbreviations in that array, if it finds something it will append a variable until all item in the array have been found, then returns the appended variable. Having trouble with it though... [CODE=php]function check_programs($input) … |
|
I need help with an assignment for my programming course. I have three classes A,B,C. all stored in one array. (These are not my real classes there are just a guide) [CODE=c] Class A{ char name; public: virtual print(){ printf("%s",name); } } Class B : public A{ char middleName; public: … |
|
Frame complete game, only the outer edges of a square drawn on the table is a game played with 2 players. Sequence of a square drawn from the player wants to draw a non-edge. Underline that this edge of the square is not the last edge of the square is … |
|
hi I have been working in this code for a while and I need to know what's wrong with it ASAP. here: [CODE]#include<iostream> using namespace std; class Node { public: int value; Node * next; Node(); Node(int); }; Node::Node():value(0),next(NULL){} Node::Node(int v):value(v),next(NULL){} bool AllPositive(next * h) { bool test = false; … |
|
I'm having a problem with my program. This program will display the numbers and get the average of them, average of positive and negative numbers, and also display the largest element. I have 3 files. For header, other functions and main function. Prog.h [CODE]#ifndef Prog #define Prog class Prog { … |
|
[B][COLOR="Red"]Hi all, Clould someone please tell how to use the sorted function or equivalent to this function in Python 3 so that I can sort a dictionary. I cannot find any help on this. Thanks for your time [/COLOR][/B] |
|
i have this function and it is giving me this warning. and i have many similar functions so by the time i'll be done i'll have a thousand warnings how can i get rid of the warnings Function 'SelectRows_local' doesn't return a value on all code paths. A null reference … |
|
I would like to know on how to solve this particular equation. Create 4 functions Main function Get number of employees (less than 10) Get employees hourly salary Store in an floating point array called salaries Calls calculate pay function Calls print pay function number_of_employee_times Calls print pay function 2 … |
The End.