100% found this document useful (1 vote)
33 views

Int Int Int Int Int

The document defines several variables and assigns initial values of 0. It then concatenates two strings and performs basic math operations including addition, subtraction, multiplication, and division. The rest of the document demonstrates various operators in C# including comparison, logical, assignment, and increment operators. It also shows a conditional operator and member access/method invocation.

Uploaded by

jan019
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
33 views

Int Int Int Int Int

The document defines several variables and assigns initial values of 0. It then concatenates two strings and performs basic math operations including addition, subtraction, multiplication, and division. The rest of the document demonstrates various operators in C# including comparison, logical, assignment, and increment operators. It also shows a conditional operator and member access/method invocation.

Uploaded by

jan019
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

int c; int int int int x y a b = = = = 0; 0; 0; 0;

myString = myFirstName + myLastName; someValue = (3 * x) / 100; if (x > y) z = "Bob"; x + y;

// Assignment operator x = 3; // Addition operator x = 3 + 4; // Subtraction operator x = 4 - 3; // Multiplication operator x = 10 * 5; // Division operator x = 10 / 5; // Equality operator if (x == y) { } // Greater than operator if (x > y) { } // Less than operator if (x < y) { } // Greater or equal to operator if (x >= y) { } // Less than or equal to operator if (x <= y) { } // Conditional AND operator if ((x > y) && (a > b)) { } // Conditional OR operator if ((x > y) || (a > b)) {

} // Conditional string message = (x == 1) ? "Car" : "Boat"; // Member access and Method invocation Console.WriteLine("Hi");

i++ is the same as i = i + 1

You might also like