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? -
#include <iostream>
-
#include <conio.h>
-
#include <cstdlib>
-
#include <math.h>
-
#include <stdio.h>
-
#include <time.h>
-
using namespace std;
-
-
int i, j;
-
int x[6];
-
int A[6], B[6], C[6], D[6], E[6], F[6];
-
// The members of the array int minimum = numbers[0] ;
-
int minimum;
-
int main(void)
-
{
-
{
-
for(i=1;i<7;i++)
-
-
{
-
for(i=1;i<7;i++)
-
{
-
x[i]=i;
-
A[i]=(2+pow(x[i],2));
-
B[i]=(1+pow(x[i],3));
-
C[i]=(2+pow(x[i],2)-1);
-
D[i]=(3*pow(x[i],3));
-
E[i]=(1+pow(x[i],2));
-
F[i]=(3+pow(x[i],2));
-
}
-
{
-
printf("\n");
-
-
for(i=1;i<7; i++)
-
-
{
-
printf("[%d][%d] A[%d]=%d\n", i,1, i, A[i]);
-
}
-
printf("\n");
-
for(i=1;i<7; i++)
-
-
{
-
printf("[%d][%d] B[%d]=%d\n", i,2, i, B[i]);
-
-
}
-
printf("\n");
-
for(i=1;i<7; i++)
-
-
{
-
printf("[%d][%d] C[%d]=%d\n", i,3, i, C[i]);
-
-
}
-
printf("\n");
-
for(i=1;i<7; i++)
-
-
{
-
printf("[%d][%d] D[%d]=%d\n", i,4, i, D[i]);
-
-
}
-
printf("\n");
-
for(i=1;i<7; i++)
-
-
{
-
printf("[%d][%d] E[%d]=%d\n", i,5, i, E[i]);
-
}
-
printf("\n");
-
for(i=1;i<7; i++)
-
-
{
-
printf("[%d][%d] F[%d]=%d\n", i,6, i, F[i]);
-
}
-
}
-
}
-
}
-
printf("\n");
-
-
printf ("A\tB\tC\tD\tE\tF");
-
printf ("\n_\t_\t_\t_\t_\t_\t");
-
-
for(i=1;i<7;i++)
-
{
-
cout<<endl;
-
-
printf("%d\t", A[i]);
-
printf("%d\t", B[i]);
-
printf("%d\t", C[i]);
-
printf("%d\t", D[i]);
-
printf("%d\t", E[i]);
-
printf("%d\t", F[i]);
-
}
-
-
-
// Compare the members
-
minimum = A[i], B[i],C[i], D[i], E[i], F[i]; for (int i = 1; i < 7; ++i)
-
{
-
if (A[i], B[i],C[i], D[i], E[i],F[i] < minimum)
-
minimum = A[i], B[i],C[i], D[i], E[i],F[i]; }
-
-
printf("\n");
-
// Announce the result
-
cout << "The lowest member value of the array is "<< minimum << "." << endl;
-
-
return 0;
-
}
1 1333
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
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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:...
|
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)...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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...
| |