Skip to content

Instantly share code, notes, and snippets.

View mayomi1's full-sized avatar
🦀

Mayomi Ayandiran mayomi1

🦀
View GitHub Profile
@mayomi1
mayomi1 / currency_code.js
Created September 30, 2021 04:13
List of currency code and currency name
const currency = [
{
currency_name: 'Afghani',
currency_code: 'AFN'
},
{
currency_name: 'Lek',
currency_code: 'ALL'
},
{
import java.util.Scanner;
public class CardChecker {
/** Main Method */
public static void main(String[] args) {
Scanner input = new Scanner(System.in); // Create a Scanner
// Prompt the user to enter a credit card number as a long integer
System.out.print("Enter a credit card number as a long integer: ");
long cardNumber = input.nextLong();
@mayomi1
mayomi1 / npsolutions
Last active March 9, 2018 23:39
NP-solutions
Question (1)
let sum = 0
for (let i = 0; i<= 1000; i++){
if(i % 3 === 0 || i%5 === 0) {
sum = sum + i;
}
}
console.log(sum)
<?php
$jack = dog;
if($jack==Dog){
echo “jack is a dog”;
}
else{
echo “jack is a man”
}
?>
<?php
$x = dog
echo strlen($x);//this print the number of number of letters in the variable 
echo ucwords($X);//this converts the first character of each word in a string to uppercase
echo ucfirsts($x);//Converts the first character of a string to uppercase
?>
<?php
$x = 5 //integer: you can see its a number
$y = “hello world” //String: you can its a word
$y = true // Boolean: This is can represent two state, true or false
?>
@mayomi1
mayomi1 / hello.php
Last active August 30, 2017 19:56
php tutorial
<?php 
$varible = “hello from the other side”;
$variable1 = “I must have called a thousand times”;
echo $variable
echo $variable1
echo “$variable $variabel1”;
echo $variabel.’ ‘ . $variable;
?>