Create function to display the planets

Assignment Help C/C++ Programming
Reference no: EM131743090

Rewrite the following code and create function to display the planets and their diameters. Instead of the code in main, create the function to this. Pass both arrays to the function.
static void Main(string[] args)
{
string[] planet = new string[]{"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"};
double[] diameter = new double[] { 4879, 12104, 12756, 6792, 142984, 120536, 51118, 49528 };
Console.WriteLine("Each planet and its diameter are shown below:");
for(int i=0;i<8;i++)
{
Console.Write("nPlanet: "+planet[i]);
Console.Write("tDiameter: "+diameter[i]);
}
Console.ReadLine();


}
}

Reference no: EM131743090

Questions Cloud

How were their views of america similar and dissimilar : How were their views of America similar and dissimilar, Expatriate writers left America and wrote of being American from afar
Intialize the pointer array with the sequence : Assist you when completing your Programming Using Arrays and Pointers assignment
Determine in what ways the u.s. government currently tries : examples that support your viewpoint. Determine in what ways the U.S. government currently tries to support the arts
Explain which of the hr practices described in given case : Explain which of the HR practices described in the case you think can contribute to ethical behavior by TSA employees. Why?
Create function to display the planets : Create function to display the planets and their diameters. Instead of the code in main, create the function to this. Pass both arrays to the function
Analysis in relation to the article you have chosen : This section of the assignment is your own analysis in relation to the article you have chosen
Exercise to include an array of shareholders : Java program from exercise to include an array of Shareholders. As each Shareholder object is created from the file place it into the array of Shareholders.
Why do marketing professionals care about : Why do marketing professionals care about and participate in supply chain decisions? Do you think small business owners are at a disadvantage.
What are the common elements that bind all stories : What are the common elements that bind all these stories, What are the differences

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd