213 Topics
|
|
Dear friends, I have this form (raffle_winner_form.htm) with the action in raffle_winner.php: <form name="form1" method="post" action="raffle_winner.php"> <label> Max numbers: <input type="text" name="max"> </label> <p> <label> <input type="submit" name="submit" value="calculate"> </label> </form> **raffle_winner.php** <?php session_start(); $session = session_id(); $number = mt_rand(1,$_POST[max]); ?> My intention is to show the random number in … |
|
Dear All, I have written a program that finds the integer whose square is closest to but greater than the integer number input as data. But it is giving me an erroneous answer. My algorithm is: 1. Select a number which is half the input number. 2. Square it and … |
|
I need implementation of this problem using ADT List. It should have at least 3 modules( classes). Help me please! A math teacher needs a program in order to help students to test different properties of numbers. The program manages a list of numbers and also allows students to repeatedly … |
|
|
Hey bros. I made a program that prints out random numbers in a linked list. I want to have the index number next to each of the random numbers in the list. I guess for example like: 1 25 2 123 3 56 ect. Here's m program so far, and … |
I'm completely lost with this assignment code. The objective is to modify this program that originally asked the user for an input 1-12 for a month, and it outputs the number of days in that month. The modifications would make it so that the user inputs the name of the … |
|
Hi there, I need to overload istream in this way: it needs to get string, then it has to parse this string and get number - can be longer than long long, and then save this number in another string, which I will give to class method. So far so … |
|
what I'm pretty sure I learned in school and what like every website said when I tried to look this up online was that the C++ code for generating a random number with floor: 1 and ceiling 100 (err I guess 101) is: [CODE]int number = rand() % 100 + … |
|
Hey everyone, I am trying to create a random number generator with MIPS assembly. I have most of the code written, I just need to change my set number for a guessing game to a random number. I also want to ask the user if they'd like to play again. … |
|
Hey guys, I need help recognizing multiple digit numbers that are read so that I may push said number into a stack for future evaluation For example: 22 3 + should evaluate to 25 When I input 22 3 +, my output is evaluated to 5 Any help/criticism is welcome … |
|
I am having some problems with my "sum of numbers program," and cannot figure out why I am not getting the correct answers. This is my first Assembly programming class, so take it easy on me, please. The assignment is: Prompt a user for an integer n, compute the sum … |
|
I am having a problem displaying random numbers, I'm trying to make a dice game where you play against the computer and the first one to 100 wins. However, my random number is never random, it always comes out as the same number. From what I understand to simply display … |
|
Im trying to write a program that inputs a single letter and prints out the corresponding digit on the telephone. Im having trouble finding out a way in which you can group the variables that have the same digit, but im not sure how. You guys have any suggestions? P.S. … |
|
Hi Guys, I'm looking the syntax for a input mask that will allow me to input 1.23, 12.34, 123.45 into the JFormattedTextField i found something like ###.## but that doesn't work but something like ###-## wud work. just wondering if anyone knows how to do this with a mask or … |
|
Hi all, How can i validate a text in text box? I need to check that text length is 7 and first four characters is contain "ABCD" and last three characters must contain numbers. e.g : ABCD123 Thank you. |
|
I'm trying to validate the correct format for a phone number in a text box: (000) 000-0000 For a test, i made it so that a messagebox shows up saying "correct" if the format is correct. This test works well WHEN the format is correct. BUT when the format IS … |
|
So this is my second project in C++, but I'm having some trouble understanding Recursive functions. We are supposed to write a program that has a recursive function. And the program should ask the user for a number. And then display the number of even digits that the number had. … |
|
Alright so basically i need to create a simple maths game in C. Involving addition subtraction and multiplication of random numbers. But i also need to add a timer to that. So lets say you are given 10 seconds to answer the question and every correct answer adds you 10 … |
|
Hello, guys. I made a program to compare numbers, Example input: [QUOTE] 1 3 10 845157 2 1101101 16 5AE12 [/QUOTE] It transfers numbers from different number system to decimal, then it compares them, but it is not so fast as i need, maybe just a little advice needed, I … |
|
I need an algorithm that finds how many prime numbers are in a set interval; the interval maximum range is 1 000 000 so a brute force method of checking every number is kinda inefficient |
|
[CODE]// DETERMINANTS by a.w.k [COLOR="red"]#include<conio.h> #include<iostream.h> #include<stdlib.h>[/COLOR] int main() { int ex,choice,a,b,c,d,e,f,g,h,i,ans; char repeat; clrscr(); do{ cout<<"\n Determinant Solver [with Explaination]"; cout<<"\n Enter your choice..."; cout<<"\n\n Press [1] for 2x2....\n \n Press [2] for 3x3...."; cin>>choice; clrscr(); if(choice==1) { cout<<"\n Enter 4 values of Determinant...."; cin>>a>>b>>c>>d; clrscr(); ans=(a*d-b*c); cout<<"\n Entered … |
|
Hi. I am just wondering how to restore a number that is in scientific notation. So, take a number that is in scientific notation, turn it into standard form, and resave the variable in standard form. here is an example of outputing the variable amount in standard form: [CODE]n1.setf(ios::fixed); cout … |
|
How can I simply format the contact number in vb.net The format that I want is (123)456-78-95 Thank You. |
|
There's the text given (Duomenys.txt). The program removes vowels of the longest words in each line. How do you redo the program to find numbers in the line (starting with -+0123456789) and insert the word NUMBER before these numbers (in the results file). [CODE]const char Cduom[] = "Duomenys.txt"; // data … |
|
In file i have a text. Words form line to line dont raising. Word in line separate least one space.Spaces can be at line begining and ending, can be empty lines. Count how many words can be in real number. i need a function whitch can count words whitch can … |
|
I got the basic understanding of what it is asking for the Declarations but im lost after the first question. 1) Declares a vehicle record as a struct with the fields: id, make, cost, sale price, profit (profit should be kept empty, it will be calculated in the program) 2) … |
|
I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 … |
|
I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 … |
|
Hello daniweb chums I once again cannot seems to get a simple bit of text box validation working I am trying to detect if a first name entered contains a number by converting the text box text into a char array and then convert each character entered (using a for … |
|
Hello, I created a simple number guessing game which thinks of a secret number from 1 to 100. It tells the user if his guess is high or low and finally stops after the secret number is equal to the user's input, it also notes down the number of tries. … |
|
hello, all! I am an absolute rookie in the world of C++ language, and not a good one either... I have an assignment to create a random number guessing game, and I am struggling with it. I have most of it done, but we have to generate the number of … |
The End.