Sunday, June 21, 2015

C# Homework : Working with variables, operators, and expressions



Set 01

01. Create a console application to print “Assalamu alaikum.” or any other preferred greetings in console window.

02. Create a console application to print your name in console window.

03. Create a console application to print 3 arbitrary numbers separated by space.

04. Create a console application to print 3 arbitrary numbers separated by tab space.

05. Create a console application to print 3 arbitrary numbers separated by newline character.

06. Create a console application to print 3 arbitrary numbers each in a new line.

07. Create a console application. In it declare 3 variables to store 3 integer numbers and then print them in console window.

08. Create a console application which will take the name of user as input and then print greetings (Assalamu alaikum/any other greetings) followed by the name provided by user.

09. Create a console application to print the following text exactly-

           The term “keyword” means reserved words by any programming language.

10. Create a console application to store a double value in a variable and print the variable value upto two decimal places.

Tuesday, May 26, 2015

Javascript Homework related to DOM

1. Make the following table using HTML and CSS for monthly salary paid to some employee. Create a javascript function which will be called on onclick event of the following button and the function will calculate the total paid salary for each employee and show at the last cell of the corresponding row.

Wednesday, May 20, 2015

Learning a programming language : Fundamental Topics that are common to almost every programming language

Those who already grained a terrible experience when learning programming from unprofessional lecturers! Listen! Programming is not as much as  terrible  you've just experienced. And also you may already overwhelmed with  C, C++, JAVA and other languages taught one after another in consecutive semesters! Don't fear at all. Just learn the following topics and how they are used for a specific language, understand what are they and practice using them one by one. In a single word master all the following topics in one language. You'll soon see all these are common to all programming language and difference is just the syntax. You say printf("Assalamu alaikum") in C, println("Assalamu alaikum") in Java, Console.WriteLine("Assalamu alaikum") in C#, echo("Assalamu alaikum") in php! But the output is the same- Assalamu alaikum!

Some Javascript homework related to iteration statement and common knowledge of function

  1. Write a Javascript function which will show the sum of the following series-
        a) 1 + 2 + 3 +…………………………………….+ 100 = ?
        b) 2 + 4 + 6 +.....................................................+ 100 = ?
        c) 1 + 3 + 5 +.......................................................+ 100 = ?

  1. Write a javascript function which will show the product of the following series-
        a) 1 * 2  * 3  *……………………………………. * 10= ?
        b) 2  * 4  * 6  *..................................................... * 10 = ?
        c) 1  * 3  * 5  *....................................................... * 9 = ?

  1. Write a javascript function which will take first number & last number of a series from user using prompt() function or two text boxes whose general difference is 1 and show the sum of the series.

  1. Write a javascript function which will take the the base and height of a triangle from user and show the area of the triangle.

  1. Area of a square.

  1. Area of a circle.