Skip to content

Instantly share code, notes, and snippets.

View faithgaiciumia's full-sized avatar
💭
online

Faith Gaiciumia Kamencu faithgaiciumia

💭
online
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
href="https://fonts.googleapis.com/css2?family=Cookie&display=swap"
rel="stylesheet"
/>
@faithgaiciumia
faithgaiciumia / main.dart
Last active February 11, 2020 09:59
Compute wages using hourly rate and hours worked.
void main() {
double hourlyRate = -0.5;
int hoursWorked = 12;
print(computeWages(hourlyRate , hoursWorked));
}
computeWages (hourlyRate , hoursWorked) {
var wages = hourlyRate * hoursWorked;
if(hourlyRate<=0||hoursWorked<=0){
throw('Negative values not allowed');
}
@faithgaiciumia
faithgaiciumia / main.dart
Last active February 10, 2020 05:24
Send Greetings
void main() {
String username = "Kuria";
print ( sendGreeting(username));
}
String sendGreeting(username){
var friendsList = [
"Moses",
"Kuria",
"Uket",
"Regina",