This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
// looping in the range of 1-30 | |
for (int i = 1; i <= 30; i++) { | |
// conditional statement to check if is odd | |
if (i % 2 != 0) { | |
print("The number is at $i"); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
num add = additon(15, 15); | |
print('The addition of the two numbers is $add'); | |
num sub = subtraction(40, 20); | |
print('The substraction of the two numbers is $sub'); | |
num xly = multiplication(10, 5); | |
print('The multiplication of the two numbers is $xly'); | |
num mod = modulus(51, 2); | |
print('The modulus of the two numbers is $mod'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
void main() { | |
// user1 | |
final user1 = TheBank(accountName: 'Dime Dush'); | |
print('accountBalance of ${user1.accountName} is ${user1.accountBalance}'); | |
print('accountNumber of ${user1.accountName} is ${user1.accountNumber}'); | |
user1.deposit(payIn: 2000); | |
print(user1.accountBalance); | |
user1.withdrawal(payOut: 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
import 'dart:math'; | |
void main() { | |
// The output should look like this: | |
print('Circle 2'); | |
Circle circle1 = Circle(); | |
circle1.setRadius = 1.0; | |
circle1.setColor = 'red'; | |
print("Area: ${circle1.getArea()}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
import 'dart:math'; | |
void main() { | |
// The output should look like this: | |
print('Circle 1'); | |
Circle circle1 = Circle(); | |
circle1.setRadius = 1.0; | |
circle1.setColor = 'red'; | |
print("Area: ${circle1.getArea()}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
print('test'); | |
} |