add files and update README

This commit is contained in:
Aditya 2022-05-04 15:24:12 +05:30
parent a4bc1d2f37
commit 1fb56f5e0f
2 changed files with 34 additions and 1 deletions

View file

@ -1,3 +1,13 @@
# shout # shout
shout in two dimensions shout in two dimensions
```
./shout aaaaaa
a a a a a a
a a
a a
a a
a a
a a
```

23
shout.cpp Normal file
View file

@ -0,0 +1,23 @@
#include <iostream>
int main(int argc, char** argv)
{
for (int a {1}; a < argc; ++a)
{
for (int i {}; argv[a][i] != '\0'; ++i)
{
std::cout << argv[a][i] << " ";
}
std::cout << std::endl;
for (int i {1}; argv[1][i] != '\0'; ++i)
{
std::cout << argv[1][i] << " ";
for (int j {1}; j < i; ++j)
{
std::cout << " ";
}
std::cout << argv[a][i] << std::endl;
}
}
}