- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
student
- Interests
- c++ programming, painting, reading novels and ofcourse studying...
i have made the following program but i cant find what is the error... the output is not coming correct... for example Enter A Binary Number 110011 Number of ones are 0 Number of zeroes are 1 [code] void main() { clrscr(); int r, ones=0, zeroes=0; long int n; printf("Enter … |
|
Re:
[code=C++] #include <iostream.h> int main() { char word[32]; int x = 0; cout << "Please enter the word (maximum 32 characters):\n"; cin >> word; cout << "The ASCII for this word is:\n"; while (word[x] != '\0') // While the string isn't at the end... { cout << int(word[x]); // Transform … |
|
Re:
//Write a function: int max(int list[], int n) that recursively finds the largest integer between list[0] and list[n]. Assume at least one element in the list. Test it with a main program that takes as input an integer count followed by that many values. Output the original values followed by … |
|
i have made a program on text file to remove extra blank spaces in a file but it is not working correctly. when i run the program just "enter text" appears and after entering the text the screen just remains as it was. Nothing else appears. I cant find where … |
|
Re:
Hi, I'm working in a 4x4 sudoku solver and i'm a beginner in c++. I use Microsoft Visual Studio 6.0 and windows xp professional Variables are: a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 a4 b4 c4 d4 First i wrote that program [CODE] //sudoku.cpp: #include<stdlib.h> … |
|
Re:
I have an issue with a section of code that will not work correctly. The first instance work fine but everything after is junk data. [code=c++] int arrivaltime = 0; int servicetime = 0; int waittime = 0; // This section shows the bank wait time for the different branch … |
|
Re:
i have been fooiling around with my program for class trying to get it to work, but now i get this error message: error C2064: term does not evaluate to a function taking 1 arguments it is referring to this part of the program: num = (rand() + time(0)) % … |
|
Re:
How to choose one element from each array., Which A(i)+B(i)+C(i)+D(i)+E(i)+F(i) must equal to 10. __________________________________________________ i A B C D E F __________________________________________________ 1 3 2 3 3 2 4 __________________________________________________ 2 6 9 4 24 5 7 __________________________________________________ 3 11 28 5 81 10 12 __________________________________________________ 4 18 65 … |
|
i am making a menu driven program on linked lists. the program's display function is printing garbage values. i.e if n=3...i add three values and when the values are displayed the last entry is displayed and the rest two enteries are garbage values for eg. [QUOTE]MENU (Linked List) 1. CREATE … |
|
Re:
#include<stdio.h> #inculde<math.h> int main () { int R,n,A; float S; printf("plz give me the value of N elements:"); scanf("%d",&n); printf("plz give me the value of the first term A:"); scanf("%d",&A); printf("plz give me the ratio between 2 consecutive elements R:"); scanf("%d",&R); S=(pow(R,n)-1)*A/(R-1); printf("the value of the sum of a geometric … |
|
Re:
i have the program written but i am having troble with a few parts. i am supposed to have the number of tries on the screen (which i do) but i need the program to ask the player if they want to play again after the game is done and … |
|
i have made a menu driven program for selection sort, bubble sort and insertion sort.. the first two are working correctly but despite writing the correct code (according to me, i have checked my code many times) the insertion sort is not giving the desired output.. here's my piece of … |
|
Re:
my intro to comp science teacher gave me an assignment to: 1) enter two different dates with the use of stucts 2) use a swap function to arrange each date in order from earliest to latest 3) use functions to calculate the number of days between the two dates 4) … |
|
Re:
How do i find the sum of a string within an array? |
|
hello everybody... i am trying to make a project on binary files and that needs a function to modify data in a binary file. I have made the following class. [code] class example { public: char name[10], number[5]; void getdetails(); void showdetails(); example() { name[0]='\0', number[0]='\0'; } char* getname() { … |
|
Re:
How do i terminate a loop. i have written for(int i = 0; students; i++) but it keeps on going forever and will not stop. |
|
Re:
Hi, I am new to C++ and I joined this forum with hopes of learning as much as i possibly can about the language. This seems like a nice place with a mature community. I bought a C++ book and I'm just now learning the basics such as goto, for, … |
|
Re:
hi! smart people. It is my 11 days of reading and studying this book turbo c/c++, and I'm almost in the last part of the book. It is fun learning computer programming using c++. I'm having problem on how to apply the principles, that i've learned,so I need an example. … |
|
Re:
I am looking to make a small program for a friend who likes to play roulette. I am looking to make a program that reads from a file which contains numbers (the numbers that come out in roulette) and then counts the amount of numbers that fall in certain groups. … |
|
Re:
I have a program that takes two separate arrays one of all the peoples names and the other of their test scores. I am not sure how to display the scores in a table view. here is my code so far [code=cplusplus] #include <iostream> #include <string> #include <math.h> using namespace … |
|
Re:
Okay, I got abotu 5 problems solved today and I am on the hardest part! Basically my code ask the user to enter series of random numbers and then use sentinel to mark the end of numbers needed to be entered. Now I want to be able to tell my … |
|
the last record is getting displayed twice.i hv rechecked everything and cudnt find the error. here is the add n display function. [code=c++] void add() { example abc; int n; ofstream file1("EXAMPLE.dat", ios::binary|ios::app); cout<<"Enter Number Of Records To Add "; cin>>n; cout<<endl; for ( int i = 0; i < … |
|
Re:
Hey guys, I'm new to this board and C++ and was looking for a little help or guidance on this program my professor assigned. She assigned the class to create a BMI Calculator, and I have all the nessesary input given for it to work perfect but im not sure … |
|
Re:
Hello there, I need to write a function that insert new data into a text file, and I manage to do that, but only for the first row.... When I close my program, and reopen it to key in a 2nd input, it will simplely overwrite my 1st input. how … |
|
hello everybody, I am a beginner in C++. I got a CD with a C++ how to program,fifth edition book by Deitel which has the source codes included in the books. The source code for ATM case study is in parts i.e. user defined header files r dere which includes … |