0% found this document useful (0 votes)
24 views

Taps

The document contains two programming assignments. The first assignment involves reading two strings from the user and displaying them on one line. The second assignment involves declaring variables, adding floating point numbers, assigning the sum to an integer variable, and displaying the result.

Uploaded by

Saurabh Shirke
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
0% found this document useful (0 votes)
24 views

Taps

The document contains two programming assignments. The first assignment involves reading two strings from the user and displaying them on one line. The second assignment involves declaring variables, adding floating point numbers, assigning the sum to an integer variable, and displaying the result.

Uploaded by

Saurabh Shirke
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/ 4

Assignment No.

:-1
Date:- / /11
Write a program to read two strings from the keyboard using the ReadLine statements and display them on one line using two Write statements.

Program:using System; class sample1 { public static void Main(string []args) { string s; Console.WriteLine("Enter your name"); s = Console.ReadLine(); Console.WriteLine("Hello"+s); Console.WriteLine("what is your age"); s = Console.ReadLine(); Console.WriteLine("you are looking nice at"+ s); } }

Name:-Tapasya B. Channe Roll No.:-05(A)

Output:-

Name:-Tapasya B. Channe Roll No.:-05(A)

Assignment No.:-2

Date:- /
Write a program to perform the following tasks >declare two variables x and y as float type variables >declare m as an integer variable >Assign the sum of x and y to m >display the value of m Comment on the output Program:using System; class sample2 { public static void Main() { float x, y; int m; x = 75.86F; y = 43.48F; m = (int)(x+y); Console.WriteLine("The sum of x And y is " + m); } }

/11

Name:-Tapasya B. Channe Roll No.:-05(A)

Output:-

Name:-Tapasya B. Channe Roll No.:-05(A)

You might also like