suppose you will get the average of N numbers.
the input would just be the N numbers
e.g.
1 2 3 4
2.5
1 2 3 4 5
3
Type: Posts; User: freddyvorhees
suppose you will get the average of N numbers.
the input would just be the N numbers
e.g.
1 2 3 4
2.5
1 2 3 4 5
3
the problem:
say you input from a file
"name1 1 2 3 4 5 6"
"name2 1 2 3 4 5 6"
"name3 1 2 3 4 5 6
"name4 1 2 3 4 5 6"
"name5 1 2 3 4 5 6"
"name6 1 2 3 4 5 6"
I think the subtraction algorithm wont work. The integer size is too large.
I'll try two's compliment
i need this by monday
if you can just give me some suggestions i'd really appreciate it
the first non zero digit is signed.
I store the ones place on index 0.
what is the best way to deal with negative integers?
what I did is to string the integer. store each digit in an int array[40]. in case of a negative integer, the only negative digit will be the...
Nice. Thanks
How do I use this function can you give me an example?
It determines the location index of a number k.
#include <iostream>
using namespace std;
int main()
{
int a[1024], k, x, i, flag;
unsigned int n;
I think its okay the max is given by our teacher, that's what hes asking for.
I changed my code to this
So I guess there's nothing wrong anymore, right?
It sorts an array, max size of array is 1024 - the max size is given by our teacher.
#include <iostream>
using namespace std;
int main()
{
int a[1024], n, x, i, j;
Nice. Thanks
So, space is a character
Are the answers different?
Is space a character ?
One more question. You can't undo what you've drawn right?
Nice. Thank you very much
Whats the "pen up"-"pen down" for if you just have to enter the coordinates?
So while using it you cant see what you are drawing until you press 6?
The Problem:
( Turtle Graphics ) The Logo language, which is popular among elementary school children, made the concept of
turtle graphics famous. Imagine a mechanical turtle that walks...
Where should I do the modification in main or in the function?
This is the whole problem:
(Visualizing Recursion) It is interesting to watch recursion "in action." Modify the factorial function of Fig. 6.29 to print its local variable and recursive call...
Cant understand it
I thought void doesn't return anything, so it means its wrong to use void?
A little more hint. Please.
But using void is appropriate, right?
Problem:
It should print its local variable and recursive call parameter. For each recursive call, display the outputs on a separate line and add a level of indentation. Do your utmost to make the...