- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 1
- Downvoting Members
- 2
12 Posted Topics
What is wrong with my fread() [CODE]#include<stdlib.h> #include<stdio.h> #include<math.h> double stdDev(double avg, double x[]) { double stdDeviation; double diff; double Sqdiff; double sum=0; int i; for(i = 0; i<50; i++) { diff=x[i]-avg; Sqdiff=pow(diff,2); sum+=Sqdiff; } stdDeviation=sum/avg; return sqrt(stdDeviation); } double maximum(double x[]) { int i; double max; max=0; for( i … | |
[CODE]void maximum(double *max, double x[]) { int i; for( i = 0; i<100; i++) { if(max < x[i]) max=x[i]; } }[/CODE] Why isnt this working Im probrably missing one syntaz that i cant think of at the moment Thank u | |
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*& … | |
This is supposed to be a code for a video game store [CODE]#include<iostream> #include<fstream> using namespace std; ifstream infile; struct VideoGame { string Name; string Genre; string Publisher; string Developer; string Platform; string Price; int count; VideoGame *link; }; void CreateList(VideoGame*& first, VideoGame*& last); void CheckOut(VideoGame*& first, string title); bool … | |
Re: i've never heard of a function adjacent... but this is how i go through my array of class [CODE]cout<<"Enter the number of faculty you currently have: "; cin>>index; for(int i=0;i<index;i++) { coscFaculty[numcoscFaculty].loadcoscFaculty(coscFaculty,numcoscFaculty); numcoscFaculty++; }[/CODE] this is my function [CODE]void facultyType::loadcoscFaculty(facultyType coscFaculty[], int numcoscFaculty) { infile>>fName>>lName>>Dept>>salary>>years; }[/CODE] you are gonna have … | |
Re: yeah i know how to do this actually Sorry i couldn't give you some code that i have use to attempt this question. But i have no idea why I should get yoour a grade when i do all the work. You're welcome in advance :) (nested) | |
[CODE][/CODE]ok this code has a few quirks that is annoying me the only part that does not straight up work is the Add a show i have a problem in increasing the size of the array. there is also the issue of couting two zeros for the minutes of the … | |
Can someone tell me what wrong with this code i am supposed to create an array of struct of cars and then add 1 to the car sold then find the inventory value comprising of all car values this is my infile lexus IS 35000 10 bmw 740 90000 5 … | |
This is my instructions [ATTACH]17319[/ATTACH] [ATTACH]17320[/ATTACH] and i am using Dev-C++ 4.9.9.2 and i am using the Mingw compiler i am a beginner. and this is my code. [CODE]#include <iostream> #include <iomanip> using namespace std; void everything(); int main() { everything(); system("pause"); return 0; } void everything() { int a,b,k,sum; … | |
Re: Use a for loop that goes up to 3 have a int "Largest" set the Largest equal to A and then compare largest with A,B, and C in the for loop. if any is larger than Largest, set Largest to the letter | |
I cant figure out what is wrong with this code These are the instructions [ATTACH]17304[/ATTACH] [ATTACH]17305[/ATTACH] [ATTACH]17306[/ATTACH] and this is my code [CODE]#include<iostream> #include<fstream> #include<iomanip> using namespace std; void Get_Info(string[],int[][3]); void Get_Average(int[][3]); void Prt_GradeBook(string[],int[][3],int[]); int MakeUps(int[][3]); int Grades[5][3],average[5]; string Students[5]; int main() { Get_Info(Students,Grades); Get_Average(Grades); Prt_GradeBook(Students,Grades,average); cout<<"There are"<<MakeUps(Grades)<<"Makeup(s) to arrange. … |
The End.