In C:
Using pointers, ask the user to enter 10 ice creams flavors they would like to save. The program should print all of the flavors back out with a number next to each flavor. Then, ask the user to choose five of their favorites flavors, this list will consist of a subset of the flavors on the flavors list. The user will specify by the flavor number, shown when the flavor list was printed, which flavors to be included in the favorites list.
#include <stdio.h>
int main()
{
//variable declaration
char flavour[10][20];
int select[5];
//get user input
printf("Enter 10 ice cream flavours: \n");
{
for(int i=0; i<10; i++)
{
fgets(*(flavour+i), 20, stdin);
}
}
//display the flavours with number
printf("\n\nThe list of flavour is: \n");
for(int i=0; i<10; i++)
{
printf("%d : %s", (i+1), *(flavour+i));
}
//get input from the user
printf("\nEnter five favorites flavors: \n");
for(int i=0; i<5; i++)
{
scanf("%d", &select[i]);
}
//display the favorite flavours
printf("\nYour favorite flavors are: \n");
{
for(int i=0; i<5; i++)
{
printf("%s", *(flavour+select[i]-1));
}
}
return 0;
}
OUTPUT:

In C: Using pointers, ask the user to enter 10 ice creams flavors they would like...
using python3
Write a Python program that will ask the user for: 1. The length of a rectangle. 2. The width of a rectangle and will print out the length of the diagonal of the rectangle. So your program should look like this: Please enter the length of the rectangle: Please enter the width of the rectangle: The diagonal of the rectangle is: So the user enters the length, width and then the answer is printed.
C programming Ask the user how many numbers they would like generated. Your program will then generate that many numbers (between 0 and 1000, inclusive) into an array of the same size. Find the smallest and largest numbers in the array, printing out the values and locations of those numbers in the array. Then, find the sum and average of the numbers in the array. Finally, print out the entire array to verify. You MUST use functions where appropriate!
This program will ask the user to enter a number of players, then ask the user for each player's name and score. Once all of the players have been entered, the program will display a bar chart with each of their scores scaled as a percentage of the maximum score entered. See below for details on exactly how this should work - an example transcript of how the program should work is shown below (remember that values entered by the...
Write a code using loop and flag function in python jupitior notebook: Ask the user for the number of items they bought. Also ask the price of each item they bought and quantity purchased. Display the total amount they owe. Ask the user for a number n. Calculate 1+2+3+….+n. Ask the user for a number n. Calculate 1*2*3*…*n. Ask the user for number of rows (r) and columns (c). Print * for r rows and c columns. Ask the user...
In C++ 1. Write a program that allows a user to enter 10 integer values from the keyboard. The values should be stored in an array. 2. The program should then ask the user for a number to search for in the array: The program should use a binary search to determine if the number exists in a list of values that are stored in an array (from Step #1). If the user enters a number that is in the...
C++
Write a C++ program that user is able to choose the function of
their wanting from this menu :
Users will be asked to enter the movies they like along with the
Genre and one Actor/Actress per movie. the entering process should
look like this:
Note that if the user enters yes, the program should start
entering the next movie with its properties.
Available movies must be entered as follow:
The program should enter as many available movies as...
Introduction to Java programming You will create a secure password. Ask a user to enter first name and last name. (Allow for mixed case) Create a random integer from 10-99. Create the password string that consists of the upper case letter of the last letter of his/her first name, the random number, and the first three letters of his/her last name in lower case. Example someone with the name Rob Lee might have a password that looks like B56lee. Your...
Java programming for ticket price calculator. It should ask the user if they would like to process another ticket order. They should indicate their selection with a Y or N. If they indicate yes, then it should repeat the entire program with the exception of the welcome screen. If they indicate no, it should show the final thank you message and end the program. If they indicate an invalid answer, it should display an error and re-prompt them for a Y...
Write a Java program for a fortune teller. The program should begin by asking the user to enter their name. Following that the program will display a greeting. Next, the program will ask the user to enter the month (a number 1-12) and day of the month (a number 1-13) they were born. Following that the program will display their zodiac sign. Next, the program will ask the user their favorites color (the only choices should be: red, green and...
Write the following program in C++. Review structures, pointers and dynamic memory allocation from CSIT 839. Also, review pointers and dynamic memory allocation posted here under Pages. For sorting, you can refer to the textbook for Co Sci 839 or google "C++ sort functions". I've also included under files, a sample C++ source file named sort_binsearch.cpp which gives an example of both sorting and binary search. The Bubble sort is the simplest. For binary search too, you can refer to...