make an x using asterisk c++
C++
//This is one that will involve user input to create an "X" using
//Asterisks.
#include <iostream>
using namespace std;
int main() {
int size;
cout << "This is where you ask for size: ";
cin >> size;
for(int i = 1;i <= size; i++) {
for(int j = 1; j<= size; j++) {
if((i == j) || (j == (size + 1) - i)) {
cout << "*";
} else {
cout << " ";
}
}
cout<< endl;
}
}
Also in C++:
- Title
- cube mapping sdl
- Category
- C++
- Title
- varint index
- Category
- C++
- Title
- Html tab
- Category
- C++
- Title
- residuo en lenguaje c
- Category
- C++
- Title
- c++ string to stream
- Category
- C++
- Title
- trovare il valore massimo in un array c++ w3
- Category
- C++
- Title
- c++ ternary operator
- Category
- C++
- Title
- How to find the suarray with maximum sum using divide and conquer
- Category
- C++
- Title
- is not a nonstatic data member or base class of class
- Category
- C++
- Title
- c++ isalphanum
- Category
- C++
- Title
- C++ remove element from set
- Category
- C++
- Title
- c++ show time elapsed
- Category
- C++
- Title
- c++ remove item from list
- Category
- C++
- Title
- std::substring
- Category
- C++
- Title
- range of int
- Category
- C++
- Title
- zeros of array c++
- Category
- C++
- Title
- random number in c++
- Category
- C++
- Title
- hashset in c++
- Category
- C++
- Title
- min heap declaration in c++ stl
- Category
- C++
- Title
- std::iomanip c++
- Category
- C++
- Title
- c++ client service ros
- Category
- C++
- Title
- c++ dereference a pointer
- Category
- C++
- Title
- change int to string cpp
- Category
- C++
- Title
- insert function in c++ vector
- Category
- C++
- Title
- find in vector in c++
- Category
- C++
- Title
- convert int to binary string c++
- Category
- C++
- Title
- creare array con c++
- Category
- C++
- Title
- cout console
- Category
- C++
- Title
- C++ string format ctime
- Category
- C++
- Title
- translate
- Category
- C++
- Title
- c++ movment
- Category
- C++
- Title
- arduino delay millis
- Category
- C++
- Title
- c++ overloaded equality check operator
- Category
- C++
- Title
- linear search in c++
- Category
- C++
- Title
- c++ calculator program using switch case
- Category
- C++
- Title
- cpp nan value
- Category
- C++
- Title
- c++ sql
- Category
- C++
- Title
- vector initialization c++
- Category
- C++
- Title
- how to iterate through a map in c++
- Category
- C++
- Title
- c++ clear console
- Category
- C++
- Title
- c++ string^ to char*
- Category
- C++
- Title
- c++ pi
- Category
- C++
- Title
- clear console c++
- Category
- C++
- Title
- find in set of pairs using first value cpp
- Category
- C++
- Title
- building native binary with il2cpp unity
- Category
- C++
- Title
- 2d vector
- Category
- C++
- Title
- c++ vector add element
- Category
- C++
- Title
- expected initializer before 'isdigit'|
- Category
- C++
- Title
- getline not working c++
- Category
- C++
- Title
- object slicing in c++
- Category
- C++
- Title
- how to make string get spaces c++
- Category
- C++
- Title
- Check if a Number is Odd or Even using Bitwise Operators
- Category
- C++
- Title
- c++ excel cell blank cells
- Category
- C++
- Title
- length of array in cpp
- Category
- C++
- Title
- how to grab all of user input c++
- Category
- C++
- Title
- can you use a return to print a string when referencing an integer c++
- Category
- C++
- Title
- how to use assrt c++
- Category
- C++
- Title
- how to check datatype of a variable in c++
- Category
- C++
- Title
- number of islands leetcode code
- Category
- C++
- Title
- accept the noun and the output of plural c++
- Category
- C++
- Title
- first prime numbers less than
- Category
- C++
- Title
- tuple c++
- Category
- C++
- Title
- how initilaize deffult value to c++ class
- Category
- C++
- Title
- check if key exists in map c++
- Category
- C++
- Title
- sfml base program
- Category
- C++
- Title
- how to find the number of cycles in a graph C++
- Category
- C++
- Title
- deque c++
- Category
- C++
- Title
- substitution failure is not an error
- Category
- C++
- Title
- string input
- Category
- C++
- Title
- maximum possible number atmost k swaps
- Category
- C++
- Title
- private and public in namespace cpp
- Category
- C++
- Title
- c++ clamp
- Category
- C++
- Title
- maximum subarray sum in c++
- Category
- C++
- Title
- how to sort a vector in reverse c++
- Category
- C++
- Title
- c++ main function
- Category
- C++
- Title
- c++ set add element
- Category
- C++
- Title
- elseif c++
- Category
- C++
- Title
- lisy stl C++
- Category
- C++
- Title
- How to find the kth smallest number in cinstant space
- Category
- C++
- Title
- file format not recognized treating as linker script c++
- Category
- C++
- Title
- glfw initialize in c++
- Category
- C++
- Title
- error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(s[i] != "b"){
- Category
- C++
- Title
- how to know the correct class of objects cpp
- Category
- C++
- Title
- c++ cli convert string to string^
- Category
- C++
- Title
- c++ overloaded == operator
- Category
- C++
- Title
- Runtime Error: Runtime ErrorBad memory access (SIGBUS)
- Category
- C++
- Title
- when ratings will be updated for codechef
- Category
- C++
- Title
- how to iterate over unordered_map c++
- Category
- C++
- Title
- pow c++
- Category
- C++
- Title
- c++ function return array
- Category
- C++
- Title
- friend function in c++
- Category
- C++
- Title
- SFML window
- Category
- C++
- Title
- apple and orange hackerrank solution in c++
- Category
- C++
- Title
- map arduino
- Category
- C++
- Title
- how to initialize a vector in c++
- Category
- C++
- Title
- c++ remove text file
- Category
- C++
- Title
- c++ string to vector int
- Category
- C++
- Title
- c++ modulo make it give only positive numbers
- Category
- C++
- Title
- remove value from vector c++
- Category
- C++
- Title
- matrix transpose tiling
- Category
- C++