Questions

Locked

Create a program that will prompt the user to enter how many random numbers are to be displayed. The random numbers have no limit, meaning to say it can range from negative numbers to positive numbers. Display all the random numbers in a 5 column format. Display the ff,a) The smallest number,b) The largest number,c) The sum of all the random numbers. Identify the following if the sum of the numbers is ODD or EVEN.
1.)If it is EVEN identify if it is DWARF or NOT DWARF. A number is considered dwarf if the sum of its factors is greater than the half of the number.
2.)If it is ODD identify if it is prime or composite. If it turns out to be a composite number, then display the factors of the sum.

The program can also go back from the start . Use statements/structures up to ITERATION/LOOPING STATEMENTS ONLY!!!

## oh, really?

Collapse -

And your homework is to be done in which language? C?
Try Mathimatica, or Maplesoft.

## Haha

Collapse -

No subtlety either. Straight from the book, grammar and all.

## If totally random numbers,

Collapse -

To me a random number may contain several decimals. But, is 3.7473 an odd or an even number? And how do I factorize that?

## It's odd

Collapse -

not as odd as this exercise though.

Got to be pure Maths if it's this impractical...

## C language

Collapse -

No it consists only a whole no. its either negative or positive...example of factoring 9=1,and 3..i hope it helps...please help me do this!oh! my prof. said that we can only use if else,while,looping:do,do while,for and neasted if only...

Collapse -

C language...

## Missed a few lessons have you?

Collapse -

Pity....

Can't write a spec either....

If you happen to think to mention what language and then happen to ask a specific question, maybe you'll get an answer.

We don't do homework. No one did ours for us.

## Sorry its C language

Collapse -

my prof said that we can only use if else,while,looping:do,do while,for and nested if statements only..please help me...do this...

Collapse -

If I had the time (it would be a fair bit of work this), and the inclination (the exercise is about as interesting as watching milk curdle to me)

You aren't going to learn anything.

As TobiF said start the struggle.

First bit is a
main function

CanExit = false;
While (!CanExit)
//ask for number of random numbers
//print it out for a laugh and to see if you did it right.
//Ask if want to leave if so set CanExit to true.

That's you outer bit done.

Then attack the rest bit by bit.

I've a feeling your prof has limited you to a subset of the language because none of us guys who could do it, would ever bother to put that much donkey work into helping someone.

Effective is all I can say.