cpp00...
This commit is contained in:
40
ex00/megaphone.cpp
Normal file
40
ex00/megaphone.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* megaphone.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/02 21:33:09 by hadi #+# #+# */
|
||||
/* Updated: 2025/09/06 15:34:45 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
i = 1;
|
||||
j = 0;
|
||||
if (argc >= 2)
|
||||
{
|
||||
while (argv[i])
|
||||
{
|
||||
j = 0;
|
||||
while (argv[i][j] != '\0')
|
||||
{
|
||||
std::cout << (char)std::toupper(argv[i][j]);
|
||||
j++;
|
||||
}
|
||||
if (argv[i+1])
|
||||
std::cout << " ";
|
||||
i++;
|
||||
}
|
||||
} else
|
||||
std::cout << "* LOUD AND UNBEARABLE FEEDBACK NOISE *";
|
||||
std::cout << std::endl;
|
||||
return (0);
|
||||
}
|
||||
Reference in New Issue
Block a user