139 Topics

Member Avatar for
Member Avatar for anandschiru

How to add an integer no to a date so tat i can a new date foe ex: date=10/11/2012 no=5 newdate=15/10/2012 **Any body plz help to solve the problem**

Member Avatar for anandschiru
0
288
Member Avatar for efth

Let's say I have a method called 'test' which should return the arraylist called 'theList' containing X number of Integers. How would I do that? public static void test(){ SOME CODE ... return theList } What should 'void' and 'theList' be replaced with in that code to make it work?

Member Avatar for efth
0
308
Member Avatar for phfilly

Hi guys! So I need help with a small problem. I'm using a char pointer array which contains a mathematical expression. For example: "sqrt 25" Now I want to use the inbuild c++ function `sqrt(int))`. I'm first searching in the array for the letters 'sqrt' so that my custom function …

Member Avatar for WaltP
0
387
Member Avatar for babi.meloo

I need to design an application that determines and prints the number of odd, even, and zero digits in an integer value read from the keyboard. This is what I have so far. public static void main (String[] args) { int odd=0, even=0, zero=0; Scanner scan = new Scanner(System.in); int …

Member Avatar for NormR1
0
3K
Member Avatar for O_mini

Hello, thanks for taking the time to read this. I'm working on (what should be) a simple, simple java program, I am very new to java so please bear with me. I'm writing code with a method that takes an array of int values and determines if all the numbers …

Member Avatar for Taywin
0
2K
Member Avatar for straylight

I am very new to C and I am hoping for some pointers. I am attempting to take an input of 7 integers of an array and search through them to see if any number appears only once. Here is what I have so far #include stdio.h #define ARRSIZE 7 …

Member Avatar for straylight
0
205
Member Avatar for TrustyTony

Here is slow brute force way to find the largest palindromic product of three digit integers. You could do loop and break out of it if you go under the smaller number (the second one) of best solution found so far to be more efficient etc.

Member Avatar for hughesadam_87
0
544
Member Avatar for rfrapp

Hello, I am trying to fill an array with 20 unique random values between 1 and 60. I know what I need to do to get this to work, but I'm not sure how to do it. Here's what I've got: void fillArray( int arr[], int size) { int arr2[20]; …

Member Avatar for RainbowMatrix
0
2K
Member Avatar for TheEroteme

I came up with a bit of code that I think will theoretically factor any given integer within the range of integers. I'm posting this thread to ask two questions: First, is there any way that I can do this more efficiently, and second, what is the easiest way to …

Member Avatar for Kwetal
0
176
Member Avatar for shashikumar s g
Member Avatar for I_m_rude
0
281
Member Avatar for boiishuvo

I made a simple program - conservative sequence integers with a sum, for example input: 15, the output should be 1, 2, 3, 4, 5 I made this program in c++ and it worked successfully, see below: #include <iostream> #include <string> using namespace std; int main() { int num, i, …

Member Avatar for Taywin
0
249
Member Avatar for dixit ankit

I am trying problem 16 from project euler, i want to add a00 integers 50 decimal places each.So i searched and found BigIntegerLibrary, but can't find any good reference material on what are the varoius functions and operators in the library. Please provide me some decent material on how to …

Member Avatar for WaltP
0
151
Member Avatar for thechampp

Hello everyone i need help with this task : "Write an expression that checks for given integer if its third digit (right-to-left) is 7. E. g. 1732 -> true"

Member Avatar for thechampp
0
151
Member Avatar for Sprewell184

Hey,hoping someone can help me. I'm having an error in my project. This is the problem for the project: In C++, the largest int value is 2, 147, 483, 647. So, an integer larger than this cannot be stored and processed as an integer. Similarly, if the sum or product …

Member Avatar for Sprewell184
0
575
Member Avatar for annette_arpana3

import java.util.*; import java.net.*; import java.awt.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.plaf.*; import java.awt.event.*; import java.io.*; import snmp.*; public class SNMPInquisitor extends JFrame implements ActionListener, Runnable { JButton getDataButton, getTreewalkDataButton, getTableButton, getNextButton, setValueButton; JButton clearButton; JTextArea messagesArea; JScrollPane messagesScroll; JTextField hostIDField, communityField, OIDField, valueField; JLabel authorLabel, hostIDLabel, communityLabel, OIDLabel, valueLabel; …

Member Avatar for JamesCherrill
0
235
Member Avatar for TrustyTony

Sometimes we want to tackle some problem specifying properties of sequence of numbers consisting the integer. Then it is usefull to have function to join many integers to make a long integer. Most efficient way for tight loops is to stay in integers domain and not go through the string …

Member Avatar for TrustyTony
0
292
Member Avatar for pooja.shinde

System date & time is in SimpleDate format. How can i convert this into integer? **"sdf.format(new Date(System.currentTimeMillis()))"...**.......... I want to convert current time** into integer** data type. *Plz plz plz help me.* Any help for this is alwayz welcome.

Member Avatar for pooja.shinde
0
225
Member Avatar for abhishek_ag

Hi All, I am writing a program to find the smallest positive integer that has n or more divisors. My program gives me correct answer for input values upto 4 but it produces erroneous answers for input values above 4. For example, it gives 10 as integer having 5 divisors. …

Member Avatar for emilo35
0
143
Member Avatar for s98samman

Using Microsoft Visual Basic Express 2010 This is the code i used: Dim b As Integer = TextBox1.Text Dim c As Integer = TextBox2.Text Dim a As Integer = b * c MsgBox(a Why does this visual basic code not work and how do i fix it to make it …

Member Avatar for JGorard159
0
553
Member Avatar for abhishekagrawal

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 …

Member Avatar for nullptr
1
245
Member Avatar for sonicx2218

hello everyone. I can't figure out how to create a random int that gets placed into a linked list. import java.util.*; import java.io.IOException; import java.util.Scanner; import java.util.Random; public class LinkedListProgram { public static void main(String[] args) throws IOException { int i,number, ran; Scanner sc = new Scanner(System.in); LinkedList<String> list = …

Member Avatar for sonicx2218
0
2K
Member Avatar for MichaelCJ10

I want to create a code that will allow me to calculate bonuses based on the 10 salarys. i need if statements for this, i need to then assign the new value to my other array i have set up called total, and then i need to display that as …

Member Avatar for zeroliken
0
316
Member Avatar for txhornsfan

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 …

Member Avatar for txhornsfan
0
4K
Member Avatar for singularity~

I have an integer called: int pID = 0; Inside my while loop I'm using pID++; to increment it. Sometimes the pID doesn't get incremented and sometimes it will. My sample output would be. 0 1 2 2 2 3 4 5 5 6 7 Does anyone have an idea …

Member Avatar for singularity~
0
234
Member Avatar for stinkypete

Does anyone have an algorithm that generates all 10-digit integers that have at least one digit repeated? Trawling through all 9000000000 of them and checking them individually is too slow. Thanks.

Member Avatar for VernonDozier
0
894
Member Avatar for Gribouillis

These two functions compute the orders of the lowest bit and the highest bit set in the binary representation of an integer. I expect them to handle securely very large integer values.

Member Avatar for Gribouillis
1
2K
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 lmytilin

I'm a little lost with C++ so I could really use your help with this one! I googled it but nothing does what I want to do! So here is my problem... Let's say I have a file like this: A 10 20 30 40 B 25 13 100 99 …

Member Avatar for Lerner
0
176
Member Avatar for TrustyTony

While looking into [URL="http://www.had2know.com/academics/gaussian-prime-factorization-calculator.html?blankone=2&result="]Gaussian primes [/URL]I came to think additional ways to check for is number integer or not, what you think is best way? [CODE]epsilon = 1e-11 def is_integer(n): """ traditional abs, epsilon check for near integer """ return abs(n-round(n)) < epsilon def is_integer2(n): return (float(n)- int(n)).as_integer_ratio()[1] == 1 …

Member Avatar for TrustyTony
0
288
Member Avatar for aaloo

this is a part of my as2 code [AS]var total_pages:Number = myData.total_pages; var nextlink:Number = myData.next; next_.onRelease = function() { if(nextlink<=total_pages) { trace(total_pages); trace(nextlink); submitDataToTextfile1(nextlink); }[/AS] this is what i m sending from my php code [PHP] echo "&total_pages=$total_pages&"; echo "&next=$l&";[/PHP] here $total_pages=29 and $l=3 my problem is when i …

Member Avatar for jkthomas
-1
127

The End.