473,799 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

print out the sorted array with say 10 entries per line

2 New Member
This is my second request. Some how I wrote the first problem I posted.
In this assignment I need to
print out the sorted array with say 10 entries per line
and then Finally it should print out a table consisting of two columns.

The first is a list of distinct numbers found and the second is how many times each number occurred in the array
How do we do it in C++
Please advise.
Thank
Eric
Nov 21 '06 #1
1 2047
sivadhas2006
142 New Member
This is my second request. Some how I wrote the first problem I posted.
In this assignment I need to
print out the sorted array with say 10 entries per line
and then Finally it should print out a table consisting of two columns.

The first is a list of distinct numbers found and the second is how many times each number occurred in the array
How do we do it in C++
Please advise.
Thank
Eric
Hi Eric,

Please try it on your own and post your code if you faced any problem.

Regards,
M.Sivadhas.
Nov 21 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3766
by: Robb Meade | last post by:
Hi all, Ok, lets say I have the following, Request.Form collection which produces this (as the element names) a b c d
1
1726
by: Mark Richards | last post by:
Hi. I am basically a novice with access. Sorry for the long question, but I can't find a short way to make this clear.... I have a database I created to track service calls for a client with a few dozen buildings across the state. They require a monthly report sorted by location showing all the activity for a given month (**even if there was no activity for a given location**). I have a basic DB structure I copied from the access...
2
7527
by: mordac | last post by:
Hello, I was wondering if I could get some opinions on how best to handle printing in a max heap data structure. Right now my heap struct looks as thus: typedef struct heapStruct { int* heapArray; int heapSize; int arraySize; int maxSize; } heapStruct; arraySize holds the current number of elements in the array.
6
2963
by: ebc | last post by:
Hi, I have written a function that removes double entries from a sorted array. See the structures typedef struct tagRECR { char name;
0
4988
by: frack78 | last post by:
I have written a binary search algorithm in java. I have a statement that when the search key is found it is printed to a terminal window. This statement when when called just keeps printing over and over and i cant figure out why :confused: . Can any one help? import java.util.Random; public class BinarySearch { Random RandomGenerator; // declares the random generator that generates the array int maxLength; // initialises the...
7
2162
by: pauld | last post by:
Ive got a series of 2 dimensional associative arrays while(list($key, $val) = each ($results)) { {foreach($val as $i=>$v) print "$i = $v"; } } but i want to define the order that the various $i's are printed in
8
2109
by: Rajesh | last post by:
Question :An element in a sorted list can be found in O(log n) time via binary search. But suppose I rotate the sorted list at some pivot unknown to you beforehand. So for instance, 1 2 3 4 5 might become 3 4 5 1 2. Now devise a way to find an element in the rotated list in O(log n) time. Once the position of the pivot element(least element)is known things will be easy. I'm not able to correct the following piece of code(which finds the...
9
7336
suzee_q00
by: suzee_q00 | last post by:
I will admit that lots of times the obvious eludes me and this is most likely one of those times but if anyone has any ideas on what I can do to make this code work, I would greatly appreciate it. Here's the code: while ( ( fgets ( buf, BUFLEN, fin ) ) != NULL ) /* pulls a line from "fin" up to the length of BUFLEN and stores it in "buf" */ { rmNl ( buf ); /* remove new line */ if ( !lineWithBlanks ( buf ) ) { for (i = 0; buf !=...
6
2085
by: Marcus | last post by:
I have a couple of classes looking like this: ======================================== public class AdminSettingsData { public string adminSettingsPath; public string adminSettingsFile; public string usersSettingsPath;
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10238
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.