1. ## Urgent Programming Problem

I have an assignment due, and I have no clue what to do. I've read up on the subject and still am not sure what to do. Here is the problem:
1.) Write a C program (name it integer.c) that asks the user to input a single integer and then reports back to the user whether the integer is positive, negative, or zero. In addition, if the integer is positive, report whether it is even or odd. If it is even, find and report the largest power of 2 that evenly divides the integer. Place this program and the others for this assignment in a subdirectory off your home directory on et791. Name this subdirectory assign13.

AND

2.) Write an interactive C program (name it real.c) that asks the user for an integer n (that represents the number of real numbers to be processed), then ask the user to enter n real numbers (numbers with decimal places), and then calculate and report the sum and product of these real numbers. Repeat this process until the user chooses to stop.

2. Post the code that you have so far.

3. ## the code i have so far

I have no clue on where to even start the code..............

4. Did you attend a class or something to get to this no clue stage? Most houses of learning teach you what you need to know or show you where to get the information before having you do exercises to reinforce idea's & concepts.

How about you white some pseudo code? Or even start the framework of the program? Define some variables? This is a help forum, not a 'We'll do all the work for every lazy bum that comes along' forum.

5. You could start by creating integer.c. First, ask the user for a number [scanf("%d",&my_int);]. Then, do some checking on that number to see if it's pos, neg...
Code:
```if( my_int > 0 )
puts("It's positive!");
if( my_int < 0 )
puts("It's negative!");
if( my_int == 0 )
puts("It's zero!");```
Of course there are better ways to do that, but that's just the basic idea. The even/odd thingy requires a little more thinking. Aha, every even number is divisible by two, with no remainder. To find the remainder of our int divided by two, we can use our friend mr. modulus (%).
Code:
```if( my_int % 2 == 0 )
puts("It's even!");
if( my_int % 2 != 0 )
puts("It's odd!");```
That's enough to get you started, hopefully.. If not, oh well, I need to sleep