O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

write a c++ program to create an inches vector from 0 to 120 with an i.docx

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio

Confira estes a seguir

1 de 2 Anúncio

write a c++ program to create an inches vector from 0 to 120 with an i.docx

Baixar para ler offline

write a c++ program to create an inches vector from 0 to 120 with an increment of 10 create the corresponding values of feet. then group the two vectors together into a table matrix
Solution
Please find the required solution:
#include <iostream>
#include <vector>
using namespace std;

int main()
{
// create a vectors to store inches,feet
vector<int> inches,feet;

//matrix to store
int inchesFeet[120][2];
int i;
// push 120 values into the inches,feet vectors
for(i = 0; i < 120; i++){
inches.push_back(i);
feet.push_back(i+10);
}
// convert to table matrix
for(i = 0; i < 120; i++){
inchesFeet[i][0]=inches[i];
inchesFeet[i][1]=feet[i];
}

//print test result
for(i=0;i<10;i++)
{
cout<<inchesFeet[i][0]<<\" \"<<inchesFeet[i][1]<<endl;
}
return 0;
}
.

write a c++ program to create an inches vector from 0 to 120 with an increment of 10 create the corresponding values of feet. then group the two vectors together into a table matrix
Solution
Please find the required solution:
#include <iostream>
#include <vector>
using namespace std;

int main()
{
// create a vectors to store inches,feet
vector<int> inches,feet;

//matrix to store
int inchesFeet[120][2];
int i;
// push 120 values into the inches,feet vectors
for(i = 0; i < 120; i++){
inches.push_back(i);
feet.push_back(i+10);
}
// convert to table matrix
for(i = 0; i < 120; i++){
inchesFeet[i][0]=inches[i];
inchesFeet[i][1]=feet[i];
}

//print test result
for(i=0;i<10;i++)
{
cout<<inchesFeet[i][0]<<\" \"<<inchesFeet[i][1]<<endl;
}
return 0;
}
.

Anúncio
Anúncio

Mais Conteúdo rRelacionado

Mais de lez31palka (20)

Mais recentes (20)

Anúncio

write a c++ program to create an inches vector from 0 to 120 with an i.docx

  1. 1. write a c++ program to create an inches vector from 0 to 120 with an increment of 10 create the corresponding values of feet. then group the two vectors together into a table matrix Solution Please find the required solution: #include <iostream> #include <vector> using namespace std; int main() { // create a vectors to store inches,feet vector<int> inches,feet; //matrix to store int inchesFeet[120][2]; int i; // push 120 values into the inches,feet vectors for(i = 0; i < 120; i++){ inches.push_back(i); feet.push_back(i+10); } // convert to table matrix for(i = 0; i < 120; i++){ inchesFeet[i][0]=inches[i]; inchesFeet[i][1]=feet[i]; } //print test result for(i=0;i<10;i++) { cout<<inchesFeet[i][0]<<" "<<inchesFeet[i][1]<<endl;
  2. 2. } return 0; }

×