What is variable .
A variable is a location in the memory.
Example
user (10,15)
Syntex- <Data type><variable_name> = <Value>;
int num = 2;
Int = int data type
Num = variable name
2 variable initialization
Data type in c#
Char
Int
Float
Double
Bool
String
Ex- String Name = "Devesh";
Float Marks = 83.56;
Int Age = 14;
Char Vowel = 'M';
Data type support by c#.
Write a program num and msg print.
Class ABC
{
static void main(string[]args)
{
int a,b,c;
a=10;
b=15;
c=a+b;
console.wirite("Sum is :" +c);
console.readline();
}
}
}
A variable is a location in the memory.
Example
user (10,15)
Syntex- <Data type><variable_name> = <Value>;
Int = int data type
Num = variable name
2 variable initialization
Data type in c#
Char
Int
Float
Double
Bool
String
Ex- String Name = "Devesh";
Float Marks = 83.56;
Int Age = 14;
Char Vowel = 'M';
Data type support by c#.
Write a program num and msg print.
Class ABC
{
static void main(string[]args)
{
int a,b,c;
a=10;
b=15;
c=a+b;
console.wirite("Sum is :" +c);
console.readline();
}
}
}
No comments:
Post a Comment