133 Topics
|
|
Consider my post in this thread... https://www.daniweb.com/programming/software-development/threads/508038/how-to-change-this-program-to-fully-oop Consider this code... int main() { srand(time(NULL)); char enter; // game starts Player player; // title cout << "Welcome to Zombie War." << endl << "Press [ENTER] to start."; cin.get(); // player name cout << "Please enter your name: "; cin >> player.playerName; … |
|
Hi, I hope you can help me out of this because i really dont understand how to fix this code anymore, i tried and tried and it don't work. When i debug this code in Microsoft Visual Express 2010, it says the following erros are: 1>------ Build started: Project: Adreesbook2, … |
|
This program challenge was given to me by my Professor for extra credit. He said it includes some programming that we haven't learned yet in our C++ class. Messed up... Ideally I would love if someone would do this for me, but we all know that's not happening. lol Anyways...could … |
|
I am writing a python program on Windows using Python 2.7. Basically, it's a program that takes a 5-digit, negative & positive, number from user & spells it out in English using num2word & then speaks it out too. I have used espeak & pyttsx both but i'm getting errors … |
|
Hello, i need help with my project. Im making a program that encrypts and decrypts the contents of a text file. I had to generate an 8 character key which is converted to ascii and then calculate the offset factor of the key that was generated (New every time program … |
|
Hi guys, I have written a program which currently accumalates different pairs and their frequency from an excel spreadsheet. (1280 pairs) Want I want to achieve is from the top 20/30 pairs, if I can find pairs that link e.g. Pair 1 [1,33] and Pair 100 [1,232] so i would … |
|
Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here. |
|
Another translation of one of my Python snippets. This function will return a slice of consecutive prime numbers from 2 to a given value limit. In Go the 'int' type (int32) will go as high as 2147483647, but you can replace 'int' with 'uint64' and go as high as 18446744073709551615. |
|
Hey, guys. A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a² + b² = c². For example, 3² + 4² = 9 + 16 = 25 = 5². There exists exactly one Pythagorean triplet for which a + b + c … |
|
Hello, guys. This challenge asks us to find the 10001-th prime. Here's my code: // A reasonable approximation is to say that the n-th prime is such that p(n) = n*(log n + log*(log n) - 1). // With that in mind, we can say that the 10001-th prime is … |
|
Hello, guys. The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 71636269561882670428252483600823257530420752963450 Find the thirteen adjacent digits … |
|
Hello, guys. Here's the challenge: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? I wrote my code: #include … |
|
Sorry for the misleading question guys, I know how to generate two random numbers but I want to use them in One JOptionPane input Dialogbox so the user can add the two numbers. Below is my code of what I have done so far I know it's not a lot … |
|
I copied this code from page 11 of http://personal.denison.edu/~krone/cs173/files/PythontoC++.pdf and assigned it to a Python string. Alas there are still line numbers. How could I use Python to remove these? Help, I have a mental block. s = ''' 1 #include <iostream> 2 using namespace std; 3 4 int gcd(int … |
|
Hi Friends, I want to do a project for Parsing Resume in C#. i.e when we upload resumes(More than 100), it should extract Name, email id, phone no, skills. **Please don't tell that software’s are available. I tried those soft wares, but they are not working properly.** So, I wanted … |
|
I am needing to write a program for someone that needs it to count by any number they manually enter into the program. I have the menu code written and now just need help with the counnting code. I know i most likely need to use a "for" loop but … |
|
I want a set of not the same numbers to be added to a listbox, if there are any numbers that are the same, then they won't be added. I tried: If (Number1 = Number2) Or (Number1 = Number3) Or (Number1 = Number4) Or (Number1 = Number5) = False Then … |
|
I've made a timer and six labels. Then a number is being generated for each label seperately. After testing how it works, I found out that sometimes two same numbers are being generated at the same time. In the picture attachment you can see how two numbers were generated at … |
|
I am trying to do a search for sub-folders in a directory that conaint numbers. The format could be a date range for example: 1-1, 01-1, 1-01, 01-01. The first number will only go up to 12 and the second one will go as high as 31 and im trying … |
|
|
#include<stdio.h> int main() { int pcheck=1,i; int k=1000 for(i=2;i<k;i++) { if((k%i)== 0) { pcheck=0; break; } } if(pcheck) { printf("%d is a prime .\n",k); } else { printf("%d is not a prime.\n",k); } return 0; } this code works to check any number i that write in k but when … |
#include<stdio.h> #include<math.h> int main() { int n,nstart,nstop,nstep,i,j,zNumber; ` printf("Please enter a value of a positive integer nstart: "); scanf("%d",&nstart); printf("Please enter a value of a positive integer nstop: "); scanf("%d",&nstop); printf("Please enter a value of a positive integer nstep: "); scanf("%d",&nstep); printf("Number\t\tzNumber\n"); printf("------\t\t-------\n"); n=nstart; zNumber= double pow(double_n,double_i); while(i<=nstop){ zNumber = … |
|
Hello, I have a quick question about c/c++ syntax. Basically I am wondering when it is allowable to have numbers in identifiers. My compiler happens to allow numbers in: * Function names * Class names * Variable names * Pre-processor names As long as they do not begin with numbers. … |
|
Good time of day! I'm working on creating an Eulers Method Calculator program. The problem I got stuck on is I don't know how to convert the user's string into a Differential Equation (dy/dx). This is what I have so far: import static java.lang.System.*; import java.util.Scanner; class EulersMethod { public … |
|
[b]TEAM A[/b]: includes members whose BC username start with A C E G I K M O Q S U V W [b]TEAM B[/b]: includes members whose BC username start with B D F H J L N P R T X Y Z [b]SCORE Board[/b] Team A: 4 Team … |
|
Hello, I have used taylor polynomials to approximate floating-point values before. I am wondering whether there is a way to still apply them to functions with complex arguments, and if there is a way what its constraints would be. For example, to calculate the sine of a floating-point number to … |
|
hello guys..can someone help me to create a function that generates random numbers composing of 9 digits with the ff limitations.. * must not have consecutive numbers in any place...sample 158461247....1 and 2 is consecutive numbers... * must not have same numbers before and after....sample 155483628....5 and 5 is same … |
|
[code]#include <iostream> using namespace std; long int math; long int check; long int divider = 1; long int inputnum; void dividerp(); void counter(); void inputp(); void dividerp(){ math = inputnum/divider; if (math == 1 or inputnum == 2 or inputnum == 1){ cout<<"You do have a prime number there!"<<endl; system("PAUSE"); … |
|
I've cust_name and install_no columns in table, each customer's name repeated 12 times as rows how to insert numbers 1 to 12 in install_no column for all rows. table sample: ----------------------------- cust_name | install_no ---------------------------- ROGER | 1 ---------------------------- ROGER | 2 ---------------------------- ROGER | 3 ---------------------------- ROGER | 4 … |
|
I am creating a simple area calculator that exhibit overloading. I already finished the overloading function, my concern is, I want to key trap the pressed letters/characters by the user. I want to allow only numbers (int & float data type) input. How will I do that? Thanks. I am … |
|
this is my code, when even i run it it tells me that the number is even while it is odd. #include<stdio.h> #include<stdlib.h> int main(void) { int value; /* To read a number and say wheither it is even or odd*/ printf("Please enter any number \n"); scanf("%u", &value); if (value/2 … |
The End.