KEMBAR78
Ics Programming Assignment | PDF
0% found this document useful (0 votes)
58 views7 pages

Ics Programming Assignment

ics programming assignment
Copyright
© © All Rights Reserved
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)
58 views7 pages

Ics Programming Assignment

ics programming assignment
Copyright
© © All Rights Reserved
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/ 7

NAME: MUHAMMAD MUZAMMIL

S.NO# 33
DATE:3/4/19

Q1) write a program that will having 2 integer constants,2 float


constants and 2 character constants and at the time of declaration
define the in the following format.
FORMAT:
Int 1 int 2

Float2 float 1

Char 1 char 2

Char 1 int 1 float 1

Float 1 char 2 int 2

SOURCE CODE:
OUTPUT:

Q2) Write a program that will be having 2 char 3 float declare at the time of definition
and display them in the following order:-

FORMAT:
__

__

Float 1 [8 spaces] character 1

Char 2 [8 spaces] float 2 [8 spaces] float 3

__

Char 1 [8 spaces] char 2

__

__

Float 1 [8 spaces] float 2 [8 spaces] float 3

SOURCE CODE:
OUTPUT:

Q3) Write program to taking two integers as input and display them in following order:

FORMAT:
int1
int2
_
_
int1 [8spaces] int2

SOURCE CODE:
OUTPUT:

Q4) Write program to taking one character, one float, two integers as input and display
them in following order:

FORMAT:
Char

int2 [8spaces] int1

float

char [8spaces] float [8spaces] int1 [8spaces] int2


SOURCE CODE:

OUTPUT:
Q5) Write program to take two integers as input and calculate their sum and display in this
order:-

FORMAT:
First No: value of first number
Second No: value of second number
Sum: sum of both values

SOURCE CODE:

OUTPUT:
Q6) Write program to take three integers as input and calculate sum if 1st and 3rd integer
and product of all three integers, Calculate double of sum and half of product and display
in this order:-

FORMAT:
Sum: first and last sum
Product: value of product
Double of sum: sum value *2
Half of product: product value/2

SOURCE CODE:

OUTPUT:

You might also like