Write a program that prompts the user to input a string and outputs the string in uppercase letters. (Use a character array to store the string
Q: Write a program to store 10 numbers in a random order, find out the index of the smallest number
A: Here in this question we have asked to write a program which store 10 number in random order.and…
Q: Write a program that reads 10 integer numbers and store them in an array of size 10. Your program…
A: Program Approach: Importing necessary package Defining the main class Defining the main method…
Q: 3. Write a program that prints a diamond as follow:
A: For the diamond at the first line and at the last line there will be one star. For other lines there…
Q: Create a java program that input two numbers and displays the largest and smallest number without…
A: /* package codechef; // don't place package name! */ import java.util.*;import java.lang.*;import…
Q: a. Write a program to multiply all the elements in the array by 2 b. If you declare an array as…
A: Given: a. Write a program to multiply all the elements in the array by 2 b. If you declare an…
Q: 4. Write a program that takes data one line at a time and reverses the words of the line. For…
A: Source Code: #include<stdio.h>#include<string.h> /* Program that reverses the words in…
Q: Suppose we have a dataset with 1000 images, each image has resolution 1080 by 1920 pixels, and it's…
A: Of Pixels X Bit Depth ÷ 8 ÷ 1024 ÷ 1024 = File Size in Megabytes (MB)
Q: Write a program , that allows the user to enter an array of elements (integers) then sort these…
A: Since you haven't specified the programming language to be used, the code provided is in C++. You…
Q: Design the logic for the game Hangman, in which the user guesses letters in a hidden word. Store…
A: Pseudocode is description of an Algorithm plain language
Q: Create a different version of the program that: Takes a 3-digit number and generates a 6-digit…
A: num = int(input("Enter number: ")) if(len(str(num))==2): one = int(str(num)[0])…
Q: ite a program named Upper-half which takes input for a two dimensional array of 5 rows and 5 columns…
A: NOTE: SINCE THE LANGUAGE OF THE PROGRAM IS NOT MENTIONED, I HAVE USED C FOR THE SOLUTION Define…
Q: Write a program to count even and odd integers in an array of numbers
A: CODE:- #include<stdio.h>int main(){int n;scanf("%d",&n);int arr[n];for(int i = 0; i <…
Q: Write Java code to do the following: Read from the keyboard an unknown number of values each of…
A: import java.util.*;public class Main{ public static void main(String[] args) { Scanner sc…
Q: Write a java program for below requirement Maximum in arrays is at least twice of other numbers.
A: Code: import java.util.*;import java.lang.*; class Main{ public static int…
Q: Write a program that creates and initializes an array with the following four values: 2.3, 4.5, 8.0,…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Initialize an array…
Q: Write a java program that print the content of array Grades. Note: a. Use Scanner method in order to…
A: Need to write java program to except grades from user using Scanner method and store it in array…
Q: Write a program which read the following (3x3 dimensional) array and then display it. 50 80 70 30 10…
A: Use a 2d array to store elements and then print it
Q: 2. Without using arrays(to store the integers/digits) and built-in methods(in doing the reverse),…
A: Java code for the given question is in step-2.
Q: Write the output of the following Java program segment. Write only the output, nothing else!…
A: Here ArrayList<Integer> a2 will be {20,24,28,32,36,40} Hence System.out.println(a2.get(4) -…
Q: Declare an array of integers with size 10 and initialize the array with random numbers between…
A: import java.util.Random;class Test153 { public static void main(String args[]) { int array[] = new…
Q: Write a JavaScript program to find the number of elements which presents in both of the given…
A: function test_same_elements_both_arrays(arra1, arra2) { var result = 0; for(var i = 0; i <…
Q: Create a variable containing a one row character array containing ‘some letters’. Do this using…
A: Given: Create a variable containing a one row character array containing ‘some letters’. Do this…
Q: In python, create an array that takes four inputs m, n, s, and p. The array takes two inputs, p and…
A: Note: Follow proper indentation as specified in the code snapshot Comments mentioned in code.…
Q: Given the following array and what it looks like when printed to the console: char a[3][4] = {…
A: Given the following array and what it looks like when printed to the console:char a[3][4] = {…
Q: Write a Java program that asks the user to enter the size for an Array. Then fill the array with…
A: I have provided JAVA CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: 2. Without using arrays(to store the integers/digits) and built-in methods(in doing the reverse),…
A: Step-1: Start Step-2: Declare a variable n and take input from user Step-3: Declare variables temp,…
Q: Write a program that creates an array of 10 user to input 10 numbers and stores each e
A: #include<stdio.h>#include<conio.h>void main(){ int a[10], i; clrscr();…
Q: Write a program that accepts values for length and width and computes and prints the area of a…
A: According to the Question below the Solution: Output:
Q: Q1 Write a program to ask the user to record students' ratings between (0 – 10) for 20 students into…
A: Java Code :- (Language is not specified in the question) import java.util.*;class Main {…
Q: sing methods and arrays, write a program that Creates and fills an array A of size 100 filled with…
A: Define java.util.* for random function. Define Main class. Define main function. Define int empty…
Q: C++ Program
A: You need to create a function which will print the desired output. In this code, we declare a…
Q: Question Write Java code to do the following: Read from the keyboard an unknown number of values…
A: Given, We have to write a code in JAVA as per the question requirement.
Q: Write a program to: fill array by 10 integers Find the second maximum Print the array Print the…
A: Please find the answer below :
Q: Write a menu driven program with the following opti 1. Read Array from the keyboard. 2. Print Array.…
A: Note: Dear student, as per policy we can answer only the 3 subparts of a question. kindly post…
Q: Create a java program that have arrays ary1 and ary2 with a code that will store the reversed value…
A: Program description: n is the user input integer variable that stores the number of elements in the…
Q: Consider an array of student marks with the following values 5.5, 6.8, 7.2, 8.5, 9.5, 10.1, 11.2,…
A: Given: Students Marks with the following Values : 5.5, 6.8, 7.2, 8.5, 9.5, 10.1, 11.2, 12.3, 13.4,…
Q: USE PYTHON…
A: Input : 11 players name from the user and store it in the array Output : Print the array after…
Q: PYTHON Given two inputs, an array of numbers, and a number, return true if number exists in the…
A: Given: We have to write a Python program that Given two inputs, an array of numbers, and a number,…
Q: Write a program that asks the user to input the sales of 10 salesperson and store them in an array.…
A: Array, which stores a fixed-size sequential collection of elements of the same type. An array is…
Q: Write a program that do the following: Ask the user to input his/her first name and store it in a…
A: PROGRAM STRUCTURE: Import the required packages. Start the definition of the main public class.…
Q: . Write a Java program to test if an array contains a specific value.
A: To write a Java program to test if an array contains a specific value.
Q: int a[10] = {1,2,3}; 1. Write a loop to print the array to the console. 2. Write the output of…
A: Since the programming language is not mentioned , I have done the code in C++ language. Algorithm :…
Q: Consider an array of student marks with the following values 5.5, 6.8, 7.2, 8.5, 9.5, 10.1, 11.2,…
A: Given: Python program to perform below tasks: Create a student marks array with given values.…
Q: Write down the flowchart of a program to read 10 integers in array the print largest integer from…
A: We have to draw flowchart of a program to read 10 integers in array the print largest integer from…
Q: Description: Write a program that declares a character array while small random letter //…
A: According to the Question below the Solution: Programming language is not mention so i am using…
Q: a. for (int i = 0; true; i++) System.out.println (a[i]); b. for (int i = 0; true; i++) ;…
A: EXPLANATION: The array elements start from the index 0 and go up to n-1 where n is the total number…
Q: Write a program that inputs 10 strings that represent floating-point values, converts the strings to…
A: Since the programming language is not mentioned, I have done the code using C language.
Write a
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- (Numerical) Using the srand() and rand() C++ library functions, fill an array of 1000 floating-point numbers with random numbers that have been scaled to the range 1 to 100. Then determine and display the number of random numbers having values between 1 and 50 and the number having values greater than 50. What do you expect the output counts to be?Write a program that asks the user to input a positive integer with at least three digits, and then outputs the integer without the first and last digits. If the input is not a positive integer with at least three digits, display "Invalid input!". Note: Use int data type only. You are not allowed to use other data types such as string and array.Python please: Write a program that creates an upward-pointing arrow. Choose 2 input characters: one for the arrow's body and one for the arrow's head, then print an upward-pointing arrow. For example, if the input is * - the output is ---------********* Note: There are two spaces preceding row one (the tip of the arrow). There is one space preceding row two. There are no spaces preceding row 3. There is one space preceding each of rows 4, 5, and 6 (the body of the arrow).
- 1. PYTHON Write the python code which selects a random number between 1 and 10, once.Prompt the user for input until they guess the random number. Print congratulation once theyguess it. 2. PYTHON Write a program to check given text is palindrome or not.A palindrome is a word, number, phrase, or other sequence of characters which reads the samebackward as forward, such as madam or racecar.6. A palindrome is a number or text phrase that reads the same backwards or forwards. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write a program that reads a 5 digit integer and determines whether it is a palindrome. Hint: One way to do this is to use division (/) and modulus (%) operators to separate the number into individual digits.Using function strtod(), Create a character string that contains the following string: “78.3% is the average success rate” Divide this string into double and display the rest of the string The output will be: The original string is: 78.3% is the average success rate The extracted double value is: 78.3 The remainder of the string is: % is the average success rate
- String - Practice Questions Write a python program using strings to read input from the user and count the character a. Write a python program using strings to read two input and convert the first input to lowercase and second input to uppercase. Write a python program using strings to read input from the use and replace all the character a with z. Write a python program using strings to read input from the user and find the length of the string.A palindromic number is a number that is the same when written forwards or backwards. The first few palindromic numbers are therefore are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 323 Input a number from the user. Write a program that reverses the digits of a number. Use this program to find if the number is a palindrome. Print if the number is palindrome or not.Three numbersa. Write a program that reads three numbers and prints “all the same” if they are allthe same, “all different” if they are all different, and “neither” otherwise.b. Write a program that reads three numbers and prints “increasing” if they are inincreasing order, “decreasing” if they are in decreasing order, and “neither”otherwise. Here, “increasing” means “strictly increasing”, with each value largerthan its predecessor. The sequence 3 4 4 would not be considered increasing.c. Repeat part b. but before reading the numbers, ask the user whetherincreasing/decreasing should be “strict” or “lenient”. In lenient mode, thesequence 3 4 4 is increasing and the sequence 4 4 4 is both increasing anddecreasing
- 4. Create a flowchart of an algorithm that reads in an array of ascending numbers starting from 1 and prints out the first 10 prime numbers in order. Your program should stop after the tenth number is printed and write a statement saying, 'here are the first ten prime numbers".Q: Write a program in python that asks the user to enter a word that contains the letter a. The program should then print the following two lines: On the first line should be the part of the string up to and including the the first a, and on the second line should be the rest of the string. Sample output is shown below: Enter a word: buffalo buffa loPlease code in python Write code that translates a name into (simplified) Pig Latin. (Please do not make this a 'real' Pig Latin translator.) Have your script ask the user for his or her name, which can comprise first, middle, and/or last parts. For each name part, move the first letter to the end of the part and append the letters "ay". Make sure that only the first letter of each word in your output is capitalized. You can use the split() method on the string to create a list of the name parts. Be sure that your script can handle one, two or three name parts separated by spaces. This will likely involve a loop. Your script should re-create the following example exactly: Enter your name: Paul LaskowskiOutput: Aulpay Askowskilay