139 Topics

Member Avatar for
Member Avatar for TrustyTony

This function I did to improve calculator program by eliminating problems with Pythons problem of dividing integer with integer and giving integer division result.

Member Avatar for TrustyTony
0
392
Member Avatar for TrueCoding

Hi, ok the problem is that when a button is click I want it to add 1 (+1) to a textbox. This process will keep on going on till I tell it not to...How would I just keep a running total of whats happening in the textbox...What I mean to …

Member Avatar for kvprajapati
0
95
Member Avatar for sana zafar

Hey, I have to write a program using vectors that will input a list of positive integers terminated by a negative integer and output the unique numbers in the list in ascending order? Can anyone help me get started?

Member Avatar for Excizted
0
144
Member Avatar for sana zafar

Hi all, I have to write a program that will input a string and convert the string to an integer value. The program should then output the integer value multiplied by 2. Also im not supposed to use any built in functions.Can anyone help me? Thanks a million! Sana Zafar

Member Avatar for sana zafar
0
176
Member Avatar for aomran

[CODE] import java.util.*; import java.util.Scanner; public class InputconsoleArray2 { public static void main(String args[]) throws java.io.IOException { int[] a=new int[100]; // create an array of type interger size // Objects of type Scanner are useful for breaking down formatted input into tokens and // translating individual tokens according to their …

Member Avatar for javaAddict
0
223
Member Avatar for max.v8

Hello guys, this is my first time in these forums, so I apologize for my bad English. Well, here's the problem: I need to get the frequency of integer numbers that are stored in a file, their range is from 0 to 100, their amount is unknown and depends on …

Member Avatar for max.v8
0
162
Member Avatar for pateldeep454

I have this code: [CODE] public static int pow (int x, int n) { if (n==0) return 1; int t = pow (x, n/2); if (n%2 == 0) { return t*t; } else { return t*t*x; } } public static void main(String[] args) { System.out.println (pow (5, 2)); } [/CODE] …

Member Avatar for pateldeep454
0
119
Member Avatar for halluc1nati0n

I was trying out a 2-dimensional integer array on a UNIX box. I hit up a 'Segmentation Fault' on trying to run it. [CODE]#include <iostream> #include <cstdlib> using namespace std; int main() { int matrix[2000][2000]; int i, j; srand ( 1 ); for (i=0; i<2000; i++) { for (j=0; j<2000; …

Member Avatar for halluc1nati0n
0
204
Member Avatar for DHPena

Hello everyone. I'm developing a program where I need to write some data on a FIFO file, and I'm using the command Write() for that. My problem, is that with that command I can't send integers, so I was thinking about Convert them to Char, and then increment them on …

Member Avatar for DHPena
0
406
Member Avatar for ddanbe
Member Avatar for ddanbe
2
986
Member Avatar for naveenreddy61

the code takes each character and stores where and how many times a roman numeral appears and the assess the integer. this is my first code im posting. anything to make the code better is most welcome. roman numeral refers to M=1000 D=500 C=100 L=50 X=10 V=5 I=1 and uses …

Member Avatar for WaltP
0
894
Member Avatar for nathanurag

[CODE=c] #include<stdio.h> #include<math.h> main() { int i=0,j,c,s[100]; double t=0; while((c=getchar())!='\n') { s[i]=c; ++i; } for(j=i;j>0;--j) { t=t+(s[i-1]*(pow(16,(4-((double)i))))); --i; } printf("%d",(int)t); return 0; } [/CODE] HI, i need to write a program that converts an hexadecimal number into integer form (for convenience i'm only considering hexadecimal no. without alphabets from a …

Member Avatar for adnan.siddique
0
123
Member Avatar for Dave Sinkula

This is a [inlinecode]strtol[/inlinecode] version of [url=http://www.daniweb.com/code/snippet353.html] Read an Integer from the User, Part 2[/url].

Member Avatar for anthonytan
0
550
Member Avatar for Farfie

Hello. I need to write a static recursive method that returns the frequency of occurrence a particular digit d in an integer n. For example, if passed (1342457,4) it should return 2, whereas when passed (1342457,6) it should return 0. I won't put my code in as it is arbitrary, …

Member Avatar for stevelg
0
155
Member Avatar for madhu28

i have a list of size 3 in my controller i say int noofcards=List1.size(); which returns me the value 3 i want to print this value in my jsp. How do i do it ? i tried this way Controller [code=java]request.setAttribute("noofcards",noofcards);[/code] jsp [code=JSP]<%= request.getAttribute("noofcards"); %>[/code] Thanks in Advance

Member Avatar for ~s.o.s~
0
55
Member Avatar for William Hemsworth

Here's a function that manually converts an integer to any base between 2 and 36, the parameter list is: [CODE]void toBase( int value, // Integer value to convert char *target, // Pointer to a large enough buffer int base, // Base (from 2 to 36) int fixedDigitCount // The minimum …

Member Avatar for William Hemsworth
0
200
Member Avatar for jen140

Hello all. I have a small problem, i need to recieve a 8 digit number for example: 12345678 87654321 and so on. After i need to devide the value and use the int as a array, something like int i=123; System.out.println(i[1]); It should return 2 (therocially), but obviously the doesnt …

Member Avatar for jen140
0
399
Member Avatar for andreib

Hello! I'm kind of new in assembly programming and I've been struggling with the following problem today: How to print an integer, using BIOS interrupt [B]10h[/B], with its [B]0Eh[/B] in AH register, as its function to print a character to the screen... For example, how to print the last digit …

Member Avatar for NotNull
-1
156
Member Avatar for michaelcadungog

Hi guys, Could someone help me on this, the problem is: Using array, Ask for 10 integer inputs then display the frequency distribution of the inputs. say, [B]Example Output:[/B] Enter input 1: 2 Enter input 2: 2 Enter input 3: 3 Enter input 4: 4 Enter input 5: 5 Enter …

Member Avatar for VernonDozier
0
182

The End.