I really have no idea where to start. Please only respond if you actually want to help. Not to name names, but some people on here are just rude. Here is the assignment and any advice will be greatly appreciated!

1. Write a program that allows the user to enter a series of positive
floating-point numbers.
2. Store the numbers in a linked list.
3. Allow the user to enter numbers until a negative number is entered. (terminate when a negative # is entered).
4. Next, transverse the list to total the numbers entered, number of nodes, and average to the screen

This is really all I have so far after reading the chapter 3 times.

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

struct num_node
{
	string pos_nums;
	float numbers;
	num_node *next;

};

num_node *head_ptr;  // pointer to head of linked list
num_node *current_ptr; // pointer to current node

// function prototypes
int get_user_data (string &nums, float &numbers);
void add_node (string &nums, float &numbers);
void move_current_to_end();
void display_list();
void delete_list();

int main()
{
	string nums;
	float numbers;

	if (get_user_data(nums, numbers))
	{
		head_ptr = new num_node;
		head_ptr->pos_nums = nums;
		head_ptr->numbers = numbers;
		head_ptr->next= NULL;

		while (get_user_data(nums, numbers))
		{
			add_node (nums, numbers);
		}

		display_list(); // display the countries and population
		delete_list(); // free the memory used by the linked list
	}
	return 0;
	}
Narue commented: After reading your caveat to responding, now I *don't* want to help. I guess that backfired, huh? -4
Fbody commented: Avert rudeness with rudeness. Good Plan :P -1

Recommended Answers

All 5 Replies

>>Please only respond if you actually want to help. Not to name names, but some people on here are just rude.
Speaking of rude...

Good luck with your assignment.

>>Please only respond if you actually want to help. Not to name names, but some people on here are just rude.
Speaking of rude...

Good luck with your assignment.

My point exactly!

My point exactly!

If you're going to come in and throw some attitude around like that, you had better expect some kick back, and be able to handle it. Get the chip off your shoulder, take your attitude down a notch, and ask a decent question.

I've seen your other threads/posts. There was nothing wrong with any of the responses to any of them. They were solved right? You blew this one all on your own. Have you looked at your reputation comments on your OP? Narue is one of the best on the forum. She was going to help and your question probably would have been answered in 1 post, but you pissed her off.

commented: rude comments and acts like he is better than everyone else. +0

If you're going to come in and throw some attitude around like that, you had better expect some kick back, and be able to handle it. Get the chip off your shoulder, take your attitude down a notch, and ask a decent question.

I've seen your other threads/posts. There was nothing wrong with any of the responses to any of them. They were solved right? You blew this one all on your own. Have you looked at your reputation comments on your OP? Narue is one of the best on the forum. She was going to help and your question probably would have been answered in 1 post, but you pissed her off.

The only person I was referring to was you. I don't know if you realize that we are newbie's and maybe need some pointers, instead of rude comments. Yes, you did help me before but some of your comments leave me with a sour taste in my mouth.

I am going to be the bigger man and just walk away from this. Thank you for your help in the past, it was greatly appreciated. Best regards!

>>The only person I was referring to was you.
Do you honestly think I don't know that? Why do you think I was so annoyed?

Look, I'm sorry for my comments in this thread. But you need to get a better idea of what rudeness is. I haven't been "rude" to you until now. I've been frank about my observations and opinions, but not rude, there is a difference.

As long as you're done, I'm done.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.