43 Solved Topics
Remove Filter
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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. … |
|
Hi double[] MyArray = new double[10]; I have 10 numbers and I get average of them. But how can print out how many of the numbers that are smaller than average, and how many of the numbers that are larger than average? |
|
I am trying to sort a certain amount of integers. I have an error in my code. The code is below as well as my error message. Any suggestions of how to fix this? I believe it has to do with it being primitive data rather than an object? `public … |
|
|
Hi I'm been trying to enter numbers into the <input> so I can calculate **Add** - **Subtract** - **Divide** - **Multiply**. This is the equations: <?php $number = 20; $number += 10; print "\$number += 10;<br /> The answer is <b>$number</b>. <br /><br />"; $number -= 12; print "\$number -= … |
Given a 7x4 array generate four random numbers from the array with no repetition. I can already generate four random numbers the problem is the repetition part. Here's my code so far int f[4]; int s[4]; for( i = 0; i < 4; i++) { // use as index for … |
|
Hey, Im trying to extract numbers from a scanner, but im having problems extracting them all. Primarily i need it to * read a text file which contains some text and numbers. * go through the file and locate all numbers * differentiate between numbers contained in bracket (3), and … |
|
I am doing following code to get the output upto 5 decimal characters of any number inputted by user when divided by 1, I have to use typecast it with (float) , can any one tell me how this can be done without typecasting or using float constant.. int main() … |
|
hi i have this variable which looks like this ؛‎ ‎002005 And i want to split it into two halfs three each . What i want to do is to put the first 3 numbers in a new variable and to remove its starting zero padding to get only 2 … |
|
|
Not sure if this has been mentioned - I did search but couldn't find anything that related: Noticed this issue in Opera today. I rarely use the browser, but seems common on all pages with code. The code numbers seem to overlap. ![Capture44](/attachments/large/0/Capture44.PNG "Capture44") As you can see, just the … |
I need to sort a series of 25 numbers, entered by the user from smallest to largest, then count the number of times the user entered the number "10". I can't use arrays and I have to use only for loops, can someone please help? |
|
I want to be able to generate my own random numbers without using the random module. I want to do this that way I can learn somewhat how to do the big boy code on my own. |
|
hey , I'm a beginner & need some help in C++ , I want to generate 4 unique numbers " any number isnt repeated within itself " I figured a way to generate 4 random numbers but they arent unique [CODE]srand((unsigned)time(0)); int number= (rand()%9999+1000);[/CODE] , I also need to put … |
|
|
Alright, I have Textbox where I want only Numbers and Letters and backspace allowed. I don't want copy and paste, or spacebar or other ascii charachters. Can anybody help me? |
Ok ,I've solved it! |
|
This is what the question is asking: Write a program to get the user to enter a positive number. Validate the input so any negative or zero number entered is rejected and the user is to re-enter the number. and this is what i have done [CODE]#include<stdio.h> int main (void) … |
|
|
Hello I'm having major issues, please help me with this code; (Generating random characters) Use the methods in RandomCharacter to print one hundred uppercase letters and then one hundred single digits, and print ten per line. Use these methods: public static char getRandomUppercaseLetter(){ return getRandomCharacter('A', 'Z'); } public static char … |
I have a string that has a ton of random characters (pulled from a webpage). I want to pull all of the numbers, commas, hyphens, periods, and percentages from the page and put them into a text file. I'm new to C++ so I'm not sure how I'd go about … |
|
I just try to calculate 5.3 - 5, and the answer is a bit off. this is the code: [CODE]double answer = 5.3 - 5; println("answer = " + answer);[/CODE] and the output is: "answer = 0.2999999999999998" instead of 0.3. I use Eclipse on win 7 32 bit as a … |
|
I am trying to take a user input phone number and perform calculations on it as an integer of type long long. I've tried this but it only reads the first 3 numbers then when it reaches the hyphen it stops. [CODE=C] printf("Enter Number: \n"); //get input from user count … |
|
[code = c][/code] I am trying to write a program that takes a 10 digit phone number and inserts hyphens between the 3rd and 4th digit and the 6th and 7th digit eg. Enter phone number: 5553459875 Your number is 555-345-9876 I've decided that reading the number as an integer … |
|
I am working in an older version of Python (2.6, I believe). I cannot update to the latest version because it is not currently compatible with the other program I need the code to run with so, unfortunately, the "decimal" module is not available to me (as far as I … |
|
I have a long stream of numbers that I need to be able to input all at once (basically copy and paste) into an array somehow. I need to do this so I can make every pair of those numbers to correspond to a letter. For example, I need to … |
|
I would like to make a LUDICROUSLY high number calculator in Python. I am thinking 60 numbers and a decimal point. So numbers could be in a format like these: 60 numbers, 30 numbers decimal point 30 numbers (30nums.30nums), or decimal point 60 numbers (.60nums). E.g. 999,999,999,999,999,999,999,999,999,999.999999999999999999999999999999 But, I am … |
|
I'm having a lot of trouble with a project for school. The project calls for me to create a random guessing game with three different levels. Each level should consist of a random number between 1 and 30. I have set my code to show between 1 and 5 for … |
|
[CODE]#include <iostream> using namespace std; int main( ) { int num1 , num2 , num3; cout << "Please Enter Three Valid Integers Using The Keyboard"; cin >> num1 , num2 , num3; if {num1 => num2} && {num2 => num3} else num1 + num2; if {num2 => num1} && {num1 … |
|
hi, i try to make a square number but its not limited by 2. number and the square can be any numbers. so its like n^n. please help me.. i confused how to do this.. any help will be appreciated. thanks. |
The End.