Problem 3: Print

Write a code to print the following output:
Name:         Mr. X
Univ:           University of Dhaka

3,485 total views, no views today

Problem 4: Diamond

Write a program to print the following output:
                           *
                        * * *
                     * * * * *
                  * * * * * * *
               * * * * * * * * *
                  * * * * * * *
                     * * * * *
                        * * *
                           *

3,875 total views, no views today

Problem 5: Blank Line

Write a program to print the following output: [There are two blank lines in the middle]

Name: Mr. DON
Country: Bangladesh

Contact: mr.don@mycompany.com

 

3,366 total views, no views today

Problem 6: Variable

Take three integer variables a, b and c. Assign values to the variables- a = 10, b = 20 and c = 30; Now print the sum of these three variables.

3,637 total views, no views today

Problem 7: ASCII Values

Write a program to print the following output:
Ascii value of ‘A’ is: ____
Ascii value of ‘@’ is: ____
In the blank space you should show the ascii code of the given characters.

4,174 total views, 2 views today

Problem 8: Average

Take four double variables x, y, z and avg. Assign values to x, y and z as you want. Now calculate the average of x, y and z and assign it to avg. Finally print the average value like-
Average of x, y and z is: —– .

3,887 total views, 2 views today

Problem 9: Bangladesh

Print “Bangladesh” without quotation sign by using ascii values.
[Use the given ascii values- B=66, a=97, n=110, g=103, l=108, a=97, d=100, e=101, s=115, h=104.]

3,231 total views, no views today

Problem 10: Precession

Rahul got 65.00 on physics, 83.50 on mathematics, 85.75 on C programming and 67.50 on English. Now write a program to calculate the average of his marks on 4 subjects and print it up to 2 digit after the decimal point. [The result should look like: XX.XX]

4,720 total views, no views today