Take an array of 5 integers as input from the user and display its value using for and while loop.
Please answer it in c#.
using System;
class HelloWorld
{
public static void Main()
{
int[] array = new int[5];
int i=0;
Console.WriteLine("Enter five integers:");
for(i=0;i<5;i++)
array[i]=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Using for loop:");
for(i=0;i<5;i++)
Console.WriteLine(array[i]);
Console.WriteLine("Using while loop:");
i=0;
while(i<5)
Console.WriteLine(array[i++]);
}
}

Take an array of 5 integers as input from the user and display its value using...
// Program takes 5 numbers from a user (from console), stores them into an // array, and then prints them to the screen (on the same line). // Add code to complete this program. You only need to add code where indicated // by "ADD HERE". #include <iostream> using namespace std; int main() { const int SIZE = 5; // size of array // ADD HERE - create an array of integers that will hold 5 integers. cout << "please...
In java, write a program that gets 10 integer numbers from the user using user input, and then calculates and display the sum of the numbers that have been read. Program Requirements: Write the program in three versions with three loops. Put all three loops in the main method of your source code. version1: use a while loop. version2: use a do-while loop. version 3: use a for loop. For each version, use a loop to input 10 int numbers from the user...
Write a program that asks the user to input 10 integers of an array. The program then inserts a new value at position (or index) given by the user, shifting each element right and dropping off the last element. For example, in the sample input/output below, the program will insert the value 30 at index 3. All the previous numbers of the array starting from position 3 (i.e., 7 1 20 9 23 8 22 will be shifted one position...
In java, write a program that gets 10 integer numbers from the user using user input, and then calculates and display the sum of the numbers that have been read. Program Requirements: Write the program in three versions with three loops. Put all three loops in the main method of your source code. The program must be in one file. version1: use a while loop. version2: use a do-while loop. version 3: use a for loop. For each version, use a loop to...
Using GUI to ask user for an alphabet input and to graphically display the hangman. During each round, the player will enter an input, and the program will display the hangman accordingly to the input. Main method with a loop that will provide a hint and prompt the user for an input after each round. String getWord() method returns a random word from our list to use for the game. Void hangman(String guess) method that will receive the user input...
(+30) Provide a python program which will Populate an array(list) of size 25 with integers in the range -100 (negative 100) to +100 inclusive Display the array and its length (use the len function) Display the average of all the integers in the array Display the number of even integers (how many) Display the number of odd integers (how many) Display the number of integers > 0 (how many) Display the number of integers < 0 (how many) Display the...
1. Write a program that prompts the user to enter three integers and display the integers in non-decreasing order. You can assume that all numbers are valid. For example: Input Result 140 -5 10 Enter a number: Enter a number: Enter a number: -5, 10, 140 import java.util.Scanner; public class Lab01 { public static void main(String[] args) { Scanner input = new Scanner(System.in); } } ---------------------------------------------------------------------------------------------------------------------------- 2. Write a program that repeatedly prompts the user for integer values from...
Write a program that asks the user to input 5 integers in an Array named "gradearray.” then passes gradearray in a function to find how many passing grades exist. (passing grades are between 60 and 100) Input elements for the gradearray : 67 43 90 100 75 There are 4 passing grades There are 1 failing grades
Write a program in JavaScript, that take (07) days temperatures from user and display the temperature in centigrade, Fahrenheit and kelvin on web browser. Hint: you can use array, for loop .
Hello, I need the array pseudocode for the following: "take input from the user on what value they want to search for, then if that value is found - output that the value is found and what index number it is contained in, otherwise output that the value is not found."