Advertisement
ezidan

task1

Dec 27th, 2022
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.33 KB | None | 0 0
  1. import 'dart:io';
  2. import 'dart:math';
  3.  
  4. void main() {
  5.   print("Task 1: ");
  6.   print("Please enter R value to calculate circumference: ");
  7.   num? number = num.parse(stdin.readLineSync()!);
  8.   num pie = 3.14159;
  9.   num rsq = pow(number, 2);
  10.   num circ = pie * rsq;
  11.   print("Circle circumference would be $circ");
  12.   print("\n---------------\n");
  13.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement