473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

how to shorten the numbers in an matrix

hi......
how to short d numbers in an matrix to print the no.s like this

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
and then hw to searh an element in it.
plz give me fast reply???????
Sep 8 '10 #1
3 1390
ashitpro
542 Expert 512MB
Do you mean "sort" ?

If yes, Let us know what you have done so far, then tell us the problem, then we can solve
Sep 8 '10 #2
yes i mean sort

plz now give me solution
Sep 8 '10 #3
Nepomuk
3,112 Expert 2GB
Hi!

We don't just hand out solutions here, but we can help you find one yourself.

There are many different sorting algorithms, the easiest probably being bubble sort and one of the faster ones is Merge sort. Pseudocode for both can be found on the wikipedia articles I linked to. Now, for that amount of items, the difference will only be marginal, so it doesn't really matter, which one you choose.

Putting them into a matrix afterwards shouldn't be too hard.

Greetings,
Nepomuk
Sep 8 '10 #4

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

Similar topics

7
by: Jonathan Smith | last post by:
Hi In order to make it easier for my colleagues to write their school reports I thought I might attempt to write a (simple) program. At the moment I am working mentally through the steps I would...
89
by: purifier | last post by:
The problem is to write a program in 'C' to find the greatest of 2 given numbers... Easy? huh here's the catch do not use 'if' or any conditional statements if u want it to be a little more...
1
by: BELIUS | last post by:
Hi all, I am implementing a "Print this Page" function in my ASP.NET application. This function should print a part of the page and I would like to use an MSDN Style "Print this Page". I'm...
4
by: Olaf \El Blanco\ | last post by:
typedef struct { unsigned char data; } packet; typedef struct { packet info; int nro_reg; } Buffer_Network; void test(void) { FILE *filename;
0
by: tasukiph | last post by:
How do I print to a dot matrix printer? I tried using pdf but when I choose to print the document there is always a margin. How do I delete the margins in pdf? Do I have to set the invoice size?...
4
by: DAXU | last post by:
Hi, I know it is very easy, but I just can't fngure out the algorithm. For example: I have these: string a={"1","2"}; string b={"a","b" "c"}; string c={"d","e","f"}; How to write an...
7
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
Who could explain the follow issue ? ¦¤ Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'gbk' codec can't encode character u'\x80' in position 0: il...
4
by: lazukars | last post by:
I am starting with a string. Let's say that string is "horse.gallup." Now I need to print out every variation of horse without one if its letters plus the ending ".gallup". So the result should be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.