intrat to gitea

This commit is contained in:
root
2025-11-15 22:13:00 +00:00
commit 025e205b80
8 changed files with 344 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
NAME = megaphone
SRCS = megaphone.cpp
CC = clang++
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
OBJS = $(SRCS:.cpp=.o)
%.o: %.cpp
@$(CC) $(FLAGS) -c $< -o $@
all : $(NAME)
$(NAME) : $(OBJS)
@$(CC) $(CFLAGS) $^ -o $(NAME)
@echo '$(NAME) compiled!'
fclean : clean
@$(RM) $(NAME)
clean :
@$(RM) $(OBJS)
re : fclean all
.PHONY : all clean fclean re
+31
View File
@@ -0,0 +1,31 @@
#include <cstring>
#include <iostream>
int main(int ac, char **av)
{
int i = 1;
int j = 0;
if (ac == 1)
{
std::cout << "* LOUD AND UNBEARABLE FEEDBACK NOISE *" << std::endl;
return 0;
}
while (av[i])
{
while (av[i][j])
{
if (av[i][j] >= 'a' && av[i][j] <= 'z')
{
av[i][j] = toupper(av[i][j]);
j++;
}
else
j++;
}
std::cout << av[i];
i++;
j = 0;
}
std::cout << std::endl;
}