Skip to content

Instantly share code, notes, and snippets.

@carlos-menezes
carlos-menezes / move_object.pwn
Last active November 9, 2018 11:09
Move two objects and keep their distance.
#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <Pawn.CMD>
main() {}
new g_Objects[2];
public OnGameModeInit() {
@carlos-menezes
carlos-menezes / is_armstrong.py
Last active July 20, 2018 10:57
Checks if a number is an Armstrong number.
# An armstrong number is a number that is the sum of its own digits raised to the power of number of digits that make up the original number.
import sys
def is_armstrong(n):
n = int(n)
sum_result = 0
# 1. Split the number into it's digits and store them in a list.
digits = list(str(n))