133 Topics
|
|
|
Hey everyone, I am having trouble on this one practice problem. It is a question that requires another question I already completed to solve this one. The qusetion is "Implement a method allPerfect() that takes an integer parameter end. The method prints every perfect number from 1 to end. Use … |
Hey guys looking for some help with my ArrayTester class... The array is supposed to 1.create a 20 element int array and populates it with random elements in the range 20 through 65 (both inclusive). -I Believe I have already done this. 2.Use the java.util.Random class with a seed of … |
|
suppose the input is 1,2,3,5-14,16-20,-25,31- :the program must print output: 1 2 3 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 0 1 2 3 ...........25 31 32 33..... til end of file I WAS REJECTED FROM MY LAST ROUND OF INTERVIEW BECAUSE … |
|
My questions are how to find the nth prime number? I have figured out how to find a list prime numbers. I'm just stuck as for being able to change my code to only print out the, say, 15th, or 500th prime not every previous prime as well. Any help/feed … |
|
#include<stdio.h> void main() {int a[100];int i;int getchar;int sum; for(i=0;i<=100;i++) while {((a[i]=getchar())!=EOF)} i++; printf("your no is =%d",&a[i]); i=0; sum=0; while(i<=100) {sum=sum+((a[i])^3); } i++; if(sum==a[100]) printf("number is armstrong"); else printf("number is normal"); not working,can someone give me an alternative usiing arrays,i got the for loop,want to execute using arrays! |
|
|
So i have write the following code (above) and now for the second part i am required to apply the Complex Number into finding the voltage across the Resistor in a series RLC circuit. The following tasks : Create an executable program Resonant Circuit, which allows you to output the … |
the book is title a guide to c++ progtraming by Tim Corica Write a program that accepts a two digit number and displays the digits each on a single line. The program output should looke similar to : Enter a two digitnumber :27 The frst digit is 2 The second … |
|
sir i need c code to generate random numbers between 1 to 100 and where the user can select the range(say 50 random numbers between 1 to 100 or 20 random numbers from 1 to 100 ) such that generated random sequence are not psuedo random numbers when it is … |
|
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 … |
|
A so-called “star number”, s, is a number defined by the formula: s = 6n(n-1) + 1 where n is the index of the star number. Thus the first six (i.e. for n = 1, 2, 3, 4, 5 and 6) star numbers are: 1, 13, 37, 73, 121, 181 … |
|
**Please help me out** I am trying to do the following: "Create a program that calculates prime numbers from a certain number X to a number Y. Modify the program so as to run two threads at the same time. The first thread will start counting from X to Y … |
|
i have textbox in my form and i want it take only numbers from 1 to 12 only and not any thong else...i am trying but iam not getting the logic for it |
|
I am new to this but i have downloaded and installed GMP library. The problem is that i have no clue on how to use it! Want to get a number larger than 18*10^18 (unsigned long long) but i dont know how! I am confused with all the mpz and … |
|
my task is to type 20 integer numbers from 0 to 99 as the input data. few tasks are to check the maximum and minimum, and find the total number of even and odd numbers. (this one i already got the answer). But i have problem for my next task, … |
|
|
|
The program I'm writing is supposed to take a number of *tosses* entered by the user, this part works. Then take that and check to see if it is within a circle that is inside of a square. Then take the number that are inside the circle, and divide it … |
|
Combining queue and stack link list? hello so here is my question i ave to connect a link lists together, one who behaves like a stack the other like a queue.the numbers used are 11 22 44 77 33 99 66. so the stack link list looks like this 66 … |
|
I'm causing input letters to write ones into variables through an array. I'm trying to count the occurences of ones in a variable. Lets say I input aaaaa. The count output displays 12345. Instead of outputting the whole count of numbers, I want to output the biggest number in the … |
|
|
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 -= … |
I admit it's a part of an assignment but I don't understand what the assignment require in this part. This program is supposed to read 10 numbers from the keyboard and then the application findMax will take one single command line argument. If you invoke findMax 1, it will print … |
|
numbers = [] line = int(raw_input('Enter number: ')) while line != '': numbers.append(line) line = raw_input('Enter number: ') print "Size:" + " " + str(len(numbers)) Hey guys, once again I need some help with a challege. http://pokit.org/get/img/c00a1897d52de5b36329564861fadb1b.jpg For your homework, you are given a set of integer data readings, and … |
|
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 … |
|
When i run a single number (1-9), it'll output as ONEONE or TWOTWO, etc.. As well with numbers 11-19, they'll show up as ONEELEVEN or TWOTWELVE, etc. 20-100 outputs fine whereas 101 becomes ONE HUNDRED TEN ONE ONE, etc.I have no idea what I've done any help would be greatly … |
|
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() … |
|
I have the following records containing 5 numbers each. They are as follows :- sr1 12, 23,34,35,36 sr2 14,18,25,31,37 sr3 7,11,19,26,42 sr4 2,17,29,32,40 sr5 5,9,16,28,33 sr6 15,21,31,39,41 Now I want to generate new records of 5 each numbers from the above numbers. New record should not contain more than 2 … |
|
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 … |
Okay, so I have a text file like this: I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn Calculus in One Day, 29.95 Feel the Stress, 18.50 Great Poems, 12.95 Europe on a Shoestring, 10.95 The Life of Mozart, 14.50 And, as you can see, there are … |
The End.