In the following code snippet what type of variable is y
Inylt main()
{
Intex=50;
Int&y=x;
cout<<y<<" "<<x;
}
Write a program that accepts grade as input from the user and stores these grades in twodimensional array with dimension of 5 rows and by 5 columns. Then count the number of grades that
passed and the number of grades that failed. Grade that pass must be greater or to equal to 80.
Sample Program:
Enter the grades: 90 95 78 89 88 71 72 79 81 82 77 74 78 88 91 73 77 75 84 98 76
89 71 87 73 79
There are 12 that passed.
There are 13 that failed.
Write a C++ function, indexSmallest(), that takes a two-dimensional array on integers with 10
rows and 1 0 columns. Along with the array, other arguments are two integers. The function will search
the array of its smallest element. The two integers will represent the indices (row and column) of the
smallest element. Also, write a program to test your function.
Sample Run:
1)
The smallest element is 1.
It is located on row 9 and column 8.
2)
The smallest element is 2.
It is located on row 5 and column 4.
3)
The smallest element is 5.
It is located on row 5 and column 0.
Write a program that prompts the user to input 2 strings then output the string with greater value. Use character
strings in implementing your solution.
Sample Run 1
Enter first string: hello
Enter second string: Hello
hello
Sample Run 2
Enter first string: hello
Enter second string: hi
hi
Write a program that prompts the user to input a string, then convert each lowercase character in it to uppercase,
and all uppercase character to lowercase. You must use character array in implementing your solution.
Sample Run:
Enter a string: Computer PROGRAMMING is Fun!
cOMPUTER programming IS fUN!
No, it’s not!
Write a program that prompts the user to input as string, then replace each vowel the exists on that string with the
character '*'. You must use character array in implementing your solution.
Sample Run:
Enter a string: 'A' is for "Apple", 'a' - 'a' ... "apple".
'*' *s f*r "*ppl*", '*' - '*' ... "*ppl*
Array
Create a program that will ask a user to enter 5 positive numbers.
The program will then display the largest and the smallest value that was entered by the user.
write a program to calculate average accelaration