40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* 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);
|
|
} |