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

Home Posts Topics Members FAQ

all data array

24 New Member
Is it true I do like below, if I want to all data array? and the ouput is 2. How to know which array that computer take?
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <cstdlib> 
  4. #include <math.h>
  5. #include <stdio.h>
  6. #include <time.h>
  7. using namespace std;
  8.  
  9.     int i, j;
  10.     int x[6];
  11.     int A[6], B[6], C[6], D[6], E[6], F[6]; 
  12.     // The members of the array    int minimum = numbers[0] ; 
  13.      int minimum;
  14.     int  main(void)
  15. {
  16. {
  17.     for(i=1;i<7;i++)
  18.  
  19. {
  20.     for(i=1;i<7;i++)
  21. {
  22.     x[i]=i;
  23.     A[i]=(2+pow(x[i],2));
  24.     B[i]=(1+pow(x[i],3));
  25.     C[i]=(2+pow(x[i],2)-1);
  26.     D[i]=(3*pow(x[i],3));
  27.     E[i]=(1+pow(x[i],2));
  28.     F[i]=(3+pow(x[i],2));
  29. }
  30. {
  31.     printf("\n");
  32.  
  33.     for(i=1;i<7; i++)
  34.  
  35. {   
  36.     printf("[%d][%d] A[%d]=%d\n", i,1, i, A[i]); 
  37. }
  38.     printf("\n");
  39.     for(i=1;i<7; i++)
  40.  
  41. {   
  42.     printf("[%d][%d] B[%d]=%d\n", i,2, i, B[i]); 
  43.  
  44.     printf("\n");
  45.     for(i=1;i<7; i++)
  46.  
  47. {   
  48.     printf("[%d][%d] C[%d]=%d\n", i,3, i, C[i]); 
  49.  
  50. }
  51.     printf("\n");
  52.     for(i=1;i<7; i++)
  53.  
  54. {   
  55.     printf("[%d][%d] D[%d]=%d\n", i,4, i, D[i]); 
  56.  
  57. }
  58.     printf("\n");
  59.     for(i=1;i<7; i++)
  60.  
  61. {   
  62.     printf("[%d][%d] E[%d]=%d\n", i,5, i, E[i]); 
  63. }        
  64.     printf("\n");
  65.     for(i=1;i<7; i++)
  66.  
  67. {   
  68.     printf("[%d][%d] F[%d]=%d\n", i,6, i, F[i]); 
  69. }
  70. }
  71. }
  72. }
  73.     printf("\n");
  74.  
  75.     printf  ("A\tB\tC\tD\tE\tF");
  76.     printf  ("\n_\t_\t_\t_\t_\t_\t");
  77.  
  78.     for(i=1;i<7;i++)
  79. {
  80.     cout<<endl;
  81.  
  82.     printf("%d\t",  A[i]);
  83.     printf("%d\t",  B[i]);   
  84.     printf("%d\t",  C[i]);
  85.     printf("%d\t",  D[i]);
  86.     printf("%d\t",  E[i]);
  87.     printf("%d\t",  F[i]);
  88. }
  89.  
  90.  
  91.     // Compare the members
  92.     minimum = A[i], B[i],C[i], D[i], E[i], F[i];    for (int i = 1; i < 7; ++i) 
  93.     {
  94.         if (A[i], B[i],C[i], D[i], E[i],F[i] < minimum)
  95.         minimum = A[i], B[i],C[i], D[i], E[i],F[i];    }
  96.  
  97.    printf("\n");
  98.     // Announce the result
  99.     cout << "The lowest member value of the array is "<< minimum << "." << endl;
  100.  
  101.     return 0;
  102. }
Oct 30 '07 #1
1 1350
sicarie
4,677 Recognized Expert Moderator Specialist
keith katthy-

You have been banned for non-observance of the Posting Guidelines. This ban will expire in 7 days, however, any further violations of the Posting Guidelines will result in an immediate and permanent ban from this site.

sicarie
Oct 30 '07 #2

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

Similar topics

2
2271
by: lawrence | last post by:
I had some code that worked fine for several weeks, and then yesterday it stopped working. I'm not sure what I did. Nor can I make out why it isn't working. I'm running a query that should return 3 items from the database. I then get a count of the return, which correctly tells me that I've got 3 items. I then go into a for loop which I expect to loop 3 times and print out the 3 items. Here is where things get strange: it loops 3 times and...
2
2056
by: jerrygarciuh | last post by:
Hello, In this sample script I create an array of objects. Print out their data with print_r().Update their data with a sub called v_set(). Print out data showing the chnages using print_r(). I push the altered objects into a new array and print them out again, still see the updated data. Then I iterate over the original array again with print_r and the objects lose the updates and have their original data. Can anyone explain what I...
4
1926
by: Michael Kirchner | last post by:
Hi everybody The output of my multiple dimension array is quite confusing. Im declaring an array, store some values in it and then I save the array in a session variable. On an other page I store the data of the session in a new multiple dimension array. All data are saved correctly in the array of the 1st page. But in the new array of the 2nd page there is only one entry. Does anybody knows
8
4596
by: Scott J. McCaughrin | last post by:
The following program compiles fine but elicits this message from the linker: "undefined reference to VarArray::funct" and thus fails. It seems to behave as if the static data-member: VarArray::funct were an extern, but it is declared in the same file (q.v.). What is the remedy for this? =================
5
1441
by: Kutty Banerjee | last post by:
hi , i ve int (*Data); int A={1,2,3,4}; Data=&A; //Question here, how d i dynamically allocate space for Data using calloc? printf("%d\n",*Data) ; //gives 1 //But printf("%d\n",*Data) produces weird value.
10
4791
by: Bart Goeman | last post by:
Hi, I have a question about how to put redundant information in data structures, initialized at compile time. This is often necessary for performance reasons and can't be done at run time (data structures are read only) Ideally one should be able to put the redundant information there automatically so no mistakes are possible, but in a lot of case I see no way how to do it.
1
14905
by: becca0619 | last post by:
Hey, Ive been looking around to find out how to read data into a 2D array and I cant find a solution that will fit my assignment. Im not sure that I should even use an array actually... ok so there is a text file set up like this 21909 87 98 95 96 79 21910 74 75 84 86 57 21911 84 85 82 80 79 etc... There is no defined number of items in the file. (my professor wants to be able to read in any number of "rows" but there will always be 6...
8
13064
by: brainflakes.org | last post by:
Hi guys, I need to manipulate binary data (8 bit) stored in a 2 dimensional array. I've tried various methods (arrays, using a string filled with chr(0), using gd lib) and so far the fastest way I've found is to actually create an 8-bit image in GD and use imagecolorat and imagesetpixel to read and write the data.
5
6697
KevinADC
by: KevinADC | last post by:
Introduction This discussion of the sort function is targeted at beginners to perl coding. More experienced perl coders will find nothing new or useful. Sorting lists or arrays is a very common requirement of programs. If you don't know the difference between a list and array don't worry about it. A list is just an array without a name. They both can hold the same type of data: scalars or strings. I will use the terms "list" and "array" to...
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,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10259
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.