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
main() | |
var name="Raushan"; | |
print(name); | |
//concatenate the string | |
var firstname="Raushan"; | |
var lastname="Jha"; | |
print(firstname+" kumar "+lastname); | |
} |
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
main() | |
{ | |
//Boolean example | |
var value=""; | |
print(value.isEmpty); | |
var number=20; | |
print(number>=30); |
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
main() | |
{ | |
//list(array) example | |
var citylist=["jaipur","delhi","mumbai","madhubani"]; | |
print(citylist); | |
print(citylist.length); | |
print(citylist.removeLast()); |
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
main() | |
{ | |
//maps examples | |
var markdetails={ | |
//key :value | |
"English":"99", | |
"Math":"89", | |
"Science":"92" |
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
main() | |
{ | |
// String to int | |
var one = int.parse('1'); | |
print(one); | |
// String to double | |
var onePointOne = double.parse('1.1'); | |
print(onePointOne); |
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
main() | |
{ | |
print("Operators Example"); | |
var a=13; | |
var b=25; | |
//perform operations | |
print(a+b); | |
print(a-b); | |
print(a*b); |
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
main() | |
{ | |
/*A leap year is exactly divisible by 4 except for century years (years ending with 00). | |
The century year is a leap year only if it is perfectly divisible by 400.*/ | |
var year=2019; | |
if(year%4==0) | |
{ | |
if(year%100==0) |
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:io'; | |
main() | |
{ | |
//WA Program to Swap Numbers Using Temporary Variable | |
var num1,num2,temp; | |
stdout.write("Enter first Number: "); | |
num1=int.parse(stdin.readLineSync()); | |
stdout.write("Enter Second Number: "); | |
num2=int.parse(stdin.readLineSync()); |
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:io"; | |
main() | |
{ | |
var num,factorial=1; | |
stdout.write("Enter a number"); | |
num=int.parse(stdin.readLineSync()); | |
for(int i=1;i<=num;i++) | |
{ | |
factorial=factorial*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
Future<List> senddata() async { | |
final response = await http.post("http://raushanjha.in/insertdata.php", body: { | |
"name": user.text, | |
"email": pass.text, | |
"mobile":mobile.text, | |
}); | |
var datauser = json.decode(response.body); |