Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

AliLtRP

🎯
Focusing
View GitHub Profile
@AliLtRP
AliLtRP / asciiValue.java
Last active Aug 28, 2022
How to convert a string into the sum of ASCII values? in java, OOP
View asciiValue.java
public class main {
public static void main(String[] args) {
Ascii a = new Ascii(); //make an object
a.setS("An example"); // the string we want to get the sum of it in asii
a.asciValue(a.getS()); // pass the string as argument
a.print(); // print the result
}
}
class Ascii{
@AliLtRP
AliLtRP / Count_Odd_Numbers_below_N.asm
Created Aug 26, 2022
Count Odd Numbers Below N in x86_64 Nasm
View Count_Odd_Numbers_below_N.asm
section .text
global oddcnt
; <-- EAX oddcnt(EDI n) -->
oddcnt:
xor eax, eax
mov edx, 0
mov eax, edi
mov ebx, 2