Advertisement
joaopaulofcc

Untitled

Aug 18th, 2020
1,384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.23 KB | None | 0 0
  1. import 'dart:io';
  2.  
  3. void main()
  4. {
  5.   int n;
  6.   int fat = 1;
  7.  
  8.   print("Digite o valor de N: ");
  9.  
  10.   n = int.parse(stdin.readLineSync());
  11.  
  12.   for(int i = n; i > 1; i--)
  13.   {
  14.     fat = fat * i;
  15.   }
  16.  
  17.   print(fat);  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement