Takes an integer “n” from user and displays the letter L using X’s.
EXAMPLE: n = 5 displays,
X
X
X
X
XXXXX
In C++
#include <iostream>
using namespace std;
int main() {
int n;
cout << "Enter a positive integer: ";
cin >> n;
for (int i = 0; i < n - 1; ++i) {
cout << "X" << endl;
}
for (int i = 0; i < n; ++i) {
cout << "X";
}
cout << endl;
return 0;
}

Takes an integer “n” from user and displays the letter L using X’s. EXAMPLE: n =...
Write a function that takes an odd integer “q” from user and displays UFO shape using X’s and O’s All UFO’s have 3 lines of X’s. a is odd and a >=5. EXAMPLE: a = 9, displays XXXXXXXXX OXXXXXXXO OOXXXXXOO EXAMPLE: a = 5, displays XXXXX OXXXO OOXOO IN C++
Write a program that takes a positive integer n as input from the user and displays an n by n checkerboard. (Hint: your main method could do user input then call the constructor for your GUI with n as the argument.) For example, when n = 5, there are 25 alternating white and black squares inside a square boarder. The lower right corner of the overall pattern must be white. Make sure that adjacent squares are different colors regardless of...
Write a program that gets an integer value from the user. Then
it finds and displays its factorial using the following
approximation
Use the function pow(x,n) and exp(x) from math.h
3 f= n! = nn e n
4. Write a program that asks the user for a positive integer no greater than 15. The program should then display a square on the screen using the character 'X'. The number entered by the user will be the length of each side of the square. For example, if the user enters 5, the program should display the following: XXXXX XXXXX XXXXX XXXXX XXXXX c++
JAVA LANGUAGE!!!! Make a program that displays n prime numbers. n is a user input. For example, If n is 7, the program displays as follows. Enter a positive integer: 7 2, 3, 5, 7, 11, 13, 17
Write a C++ program that 1. Prompt user to enter two integer a and b. 2. Then prints a b rows each of which contains a * b columns of Xs, but after each group of b complete columns the program prints a| symbol (35 pts) An example run of the program follows. a=3, b = 5 XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX| XXXXX|XXXXX|XXXXX|
Using C++ programming. Write a program that takes a string of input from the user and separates the string of words based on the premise that the string contains words whose first letter is uppercase. Then, display the phrase (or sentence) to a string in which the words are separated by spaces and only the first word of the phrase starts with an uppercase letter. For example, if the user enters "IAmTheTeacher", then the program would display: "I am the...
Write a program that receives a positive integer n from the user and then calculates the sum below by using a loop. Your program needs to ask the user to re-enter a different number if the user enters a non-positive one. Display the result. 1 SUM 1 2 3 ... n x x n = = = + + + +
Write a python script that takes a six-digit integer from the user and separate the number into its individual digits. You program should then display each digit separated by a comma each. For example, if the user types in the number 654321, the script should display: 6,5,4,3,2,1 You can assume that the user enters the correct number of digits.
Pythpn #Exercise 1 #Ask the user for a three letter word using the prompt: three letter word? (include a space after the ?) #Display the entire word #Display the word vertically, one letter at a time using print statements and the string index #For example, if the user enters baa, the output should be (ignore # signs): #baa #b #a #a #Exercise 2 #Ask the user for a number using the prompt: first number? (include a space after the ?)...