133 Topics

Member Avatar for
Member Avatar for stevthym

Hi! I have a decimal number (e.g 6433) and would like to see the process of converting this to IEEE short real floating point format! Any help is appreciated ;)

Member Avatar for Rashakil Fol
0
1K
Member Avatar for swissknife007

I am making a program to store all the powers of 2(1,2,4,8...) till 2 ^50000. Although I am getting the answer,I am not getting my answer in the required time limit. Any suggestions? How should I store the numbers? Here is my stupid code as of now [CODE] #include<stdio.h> #include<math.h> …

Member Avatar for histrungalot
0
202
Member Avatar for Kitson

Hi Guys, I'm really struggling getting to grips with C++ I need to read a .txt file which contains something similar to this: [CODE]Eng.Speed Torque 1000.0, 34.55 3800.0, 46.58 6600.0, 47.44 9400.0, 48.75 12200.0, 39.79 15000.0, 24.61[/CODE] I'm trying to: .Open a file named torque1.txt .extract the data .I want …

Member Avatar for WaltP
0
808
Member Avatar for swissknife007

I am trying to implement a program for finding the remainder on division of 2 numbers n2/n1 such that n1 is of the order of 2^32(having a few digits) and n2 is the order of 2^65536(having about 20000 digits) So far I have stored them in an array digit by …

Member Avatar for Banfa
0
145
Member Avatar for ynehs

Hi, I would like to know how to set the textbox to only accept numbers, also that will only accept numbers 1,2 & 3 only. Thanks in advanced. :icon_mrgreen: i tried but i really don't know how.

Member Avatar for Jx_Man
0
2K
Member Avatar for free2move

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?

Member Avatar for free2move
0
2K
Member Avatar for srinath1
Member Avatar for inuasha

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.

Member Avatar for snippsat
0
2K
Member Avatar for raj26061990

eg. 14 and 15 Find all the factors of 14 and 15. 1,2,7,14 are factors of 14 1,3,5,15 are factors of 15 Sum all the factors of two numbers and if sum of factors of two numbers taken are respectively equal they are Amicable numbers.

Member Avatar for cms271828
0
464
Member Avatar for PeTo.

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 …

Member Avatar for adityatandon
0
2K
Member Avatar for SeniorAlexandro

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?

Member Avatar for SeniorAlexandro
0
316
Member Avatar for cka91405

Im writing a code that ask for two positive integers entered from the keyboard. The first integer N is odd in range of 3-15 and the second with be an initial value I. N will be the size of the array. Beginning the center of the NxN array with the …

Member Avatar for Adak
0
275
Member Avatar for Matth963
Member Avatar for marifergarz

I need help with a lab I'm doing. In this lab you have to show the number of odd digits a number has, for example the number 4135 would have three odd digits. I've already done a lab where it tells you if a number is odd or even but …

Member Avatar for stevanity
0
861
Member Avatar for kiaski

A number is called a proper divisor of N if M < N and M divides N. A positive integer is called perfect if it is the sum of its positive proper divisors. For example, the positive proper divisors of 28 are 1, 2, 4, 7, and 14 and 1+2+4+7+14=28. …

Member Avatar for Ezzaral
0
255
Member Avatar for terence193

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) …

Member Avatar for YAMNA MIDHAT
0
197
Member Avatar for Manswab

hi i tried a code to implement non repeating random numbers from1 to 25..but its showing only 24 numbers..code is below..pls help me..or sujjest me a good code for non repeating random numbers[CODE] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace teasting { class Program { static void Main(string[] …

Member Avatar for Manswab
0
284
Member Avatar for valestrom

Just wondering, how high can c++ really count? Because I made a fibonacci program, and it starts acting weird and printing negatives at about 10-11 places. With both long, and int variables? Is it impossible to count higher? If not, how?

Member Avatar for Clinton Portis
0
228
Member Avatar for L0s3r

Hi Guys. Random no.'s always bother me.So,I want to start a discussion over their uniform distribution. Given : rand5() which generates randomly distributed no. from 1-5. To Code: rand7() which generates randomly distributed no. from 1-5. You have to give code using rand5() as well as without using it. Thanks,

Member Avatar for StuXYZ
0
160
Member Avatar for buzz9948

I am attempting to make a number guessing game but I need to use functions I figured a good spot for this would be the greater and less than problems that I need to include to make the user know what they have, I am horrible with functions and dont …

Member Avatar for palav sandeep
0
126
Member Avatar for I am dumb

OK Im new to C++, I'm still a beginner, i know how to make simple calculations and all. But looping is completely different and I have no idea where to start: Here's all that I have for this question (Write an application that keeps inputting an integer from the user …

Member Avatar for gerard4143
0
237
Member Avatar for alliswim2010

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 …

Member Avatar for alliswim2010
0
689
Member Avatar for Superandomness

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 …

Member Avatar for Superandomness
0
224
Member Avatar for Prisms

Ok guys I'm almost done with my GPA program but I hit a snag. everything works fine but when I insert a letter grade the program doesn't read what number it corresponds to and sets double number to zero. Can some please let me know what I'm doing wrong. [CODE]import …

Member Avatar for Prisms
0
5K
Member Avatar for TrustyTony

Roman numbers is a standard programming exercise, to give it a small twist, we input roman numeral, turn it to value and prepare minimal version of it using the substraction rule. Correctness of the input is not checked so Garbage in - Garbage out.

0
318
Member Avatar for binoman

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 …

Member Avatar for binoman
0
1K
Member Avatar for Prankmore

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 …

Member Avatar for Prankmore
0
3K
Member Avatar for Prankmore

[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 …

Member Avatar for Prankmore
0
333
Member Avatar for rhuffman8

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 …

Member Avatar for Gribouillis
0
233
Member Avatar for fashxfreak

How to calculate the sum & product of dis-similar numbers of an array[10]. i do have a code but it stop working after a certain limit, so please help.....

Member Avatar for Aslan89
0
291

The End.