Advertisement
LightProgrammer000

Tabuada Simples

Nov 19th, 2021
1,560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. clear
  4. echo -n -e "\033[01;32m *** TABUADA ***\033[01;37m\n"
  5. echo -n -e "\033[01;33m\n # Digite N: "
  6. read n
  7. echo ""
  8.  
  9. # Estrutura de repeticao
  10. for (( i = 1; i < 11; i++ ))
  11. do
  12.     # Calculo
  13.     cal=$(( i * n ))
  14.  
  15.     # Mensagem
  16.     echo -e "\033[01;3$i"m "# $i x $n => $cal \033[01;37m "
  17. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement