Lab 01
Lab 01
Definition:
Flutter (Dart) offers high performance and custom UIs, but requires learning a new language.
React Native (JavaScript) is familiar and faster for basic apps, with a larger community. Both
are cross-platform, but Flutter has a steeper learning curve due to its unique codebase. Flutter
excels in consistent design, React Native for platform-specific UIs. Choose based on project
needs, developer experience, and desired performance.
Program Questions:
print("Hello World!");
return n*fact(n-1);
int.parse(stdin.readLineSync()!);
stdout.write(fact(n));
}
3. Find a Prime number from the given range. (Static Input)
import 'dart:math'; import
'dart:io'; isPrime(int n) {
i=2;i<=sqrt(n);i++) {
if(n%i==0) { f=false;
break;
} }
if(f) {
print(n);
main(List<String> arguments) {
int l,r;
l=34; r=89;
for(int
i=l;i<=r;i++)
isPrime(i);
}
4. Find Armstrong Number from the given range. (Static input)
'dart:math';
main(List<String> arguments) {
String s = stdin.readLineSync()!;
m=n; while(m!=0) {
k=m%10;
amstr+=pow(k,l).toInt();
m~/=10;
print(amstr==n);
}
int rows = 5;
String space="";
String star="";
space+=" ";
star+="*";
print(space+star);
print('');
}
}