- 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
10 Posted Topics
Hi, Here is a simpler way for your program. [CODE]#include <iostream> #include <algorithm> using namespace std; int main(){ const int size = 10; int num = 0; int a[]= {10, 15, 27, 89, 90, 95, 27, 13, 99, 33}; cout<<"Enter the number you are looking for "; cin>>num; sort(a, a …
[CODE] #include <iostream> using namespace std; const int PLAYER_SIZE=40; const int NUM_PLAYERS=4; struct soccerData; //void getData(soccerData *); struct soccerData { int numberPlayer; int pointsScored; char namePlayer[PLAYER_SIZE]; }; int main(){ soccerData players[NUM_PLAYERS]; soccerData winner; double highestGoals = -1; //Ask info cout<< "Enter names, numbers, and points. "<<endl<<endl; for (int index=0; index<NUM_PLAYERS; …
Hi, Not sure, but you are deleting object inside the while loop, so when loop runs again, it might throw an exception as g is gone ! not sure though ! vsha041
Hi, I java, under BigInteger class, there is a function called modpow, [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#modPow%28java.math.BigInteger,%20java.math.BigInteger%29"]http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#modPow%28java.math.BigInteger,%20java.math.BigInteger%29[/URL] It allows us to answer things like 99999^9999 % 78 very quickly. But I am unable to find one for c++. Thanks
Hi, I have written the following program but its not doing what's it supposed to do ! For some reason sometimes nothing or rubbish is being printed onto the screen. However, if I don't use function but instead do everything within main(), then its fine. What's the problem with the …
Hi, I don't understand why are you reading input from the user as a string ? or do you have to ? You can go like this:- [CODE]#include <iostream> using namespace std; int main(){ int x = 0; cout<<"How many integers you want to enter ? "; cin>>x; int* arr …
Hi, I have written a c++ program which takes a word and prints a list of all possible words that can be formed from it. I want to create a .exe file which can serve this purpose for me. By that I mean, I don't want to always compile and …
Hi, I am trying to write a program, in which it will ask the user to enter a string of length exactly 9. I have got a dictionary file with me which contains over two hundred thousand words. My job is to output all the possible words between lengths 4 …
Hi, I am trying to run this code, but after the program runs, it is never asking me to enter something, instead, it just finishes. [CODE] #include <iostream> #include <string> using namespace std; int main () { string str; cout << "Please enter full name: "; getline (cin,str); cout << …
Hi, I want to write a program which can compile a different C++ file. And I want to save the output , which I will get after compilation in a different text file. For Example:- I have got two C++ files called file1.cpp and file2.cpp in the same directory. Now, …
The End.
vsha041