You are on page 1of 6

Department of Computer Science & Engineering

Vision and Mission

Vision 
Department of Computer Science & Engineering to be a leading world class
technology department playing its role as a key node in national and global
knowledge network, thus empowering the computer science industry with the
wings of knowledge and power of innovation.

Mission 
The Mission of the department is as follows:

1. To nurture talent of students for research, innovation and excellence in the


field of computer engineering starting from Under graduate level.

2. To develop highly analytical and qualified computer engineers by imparting


training on cutting edge technology.

3. To produce socially sensitive computer engineers with professional ethics.

4. To focus on R&D environment in close partnership with industry and


foreign universities.

5. To produce well-rounded, up to date, scientifically tempered, design


oriented engineer and scientists capable of lifelong learning.
PROBLEM 1
Aim: To print “hello world” on the screen.
Theory: This program is to print a sentence, here “hello world”, as
output on the screen.
Code:
#include<stdio.h>
void main()
{
Printf(“hello world”);
}

Output:

Discussion: In this program, we have used the in-build function


“printf()” which is defined in the header file named “conio.h”. This
function is used to display anything typed in double quotes and
inside this function’s parenthesis on the screen.
Learning: We learnt the use of printf() function and how to display
sentences on screen with the help of this program.
PROBLEM 2
Aim: To perform basic arithmetic operations on two numbers and
print the result on the screen.
Theory: This program is to perform addition(+), multiplication(*),
division(/) and subtraction(-) of two numbers taken by user as input
using arithmetic operators and print the result on the screen.
Code:
#include<stdio.h>
void main()
{
int res,n1,n2,f;
printf("enter numbers: ");
scanf("%d%d",&n1,&n2);
printf("enter operation: 1.Addition, 2.Subtraction,
3.Multiplication, 4.Division ");
scanf("%d",&f);
if(f==1)
res=n1+n2;
else if(f==2)
res=n1-n2;
else if(f==3)
res=n1*n2;
else if(f==4)
res=n1/n2;
else
printf("Invalid operation");
printf("The answer is: %d",res);
}
Output:

Discussion: In this program, we have used the in-built function


scanf() defined in “conio.h” to take the values of 2 numbers and also
the operation to be performed on them. Using if/else statements,
we have checked which operation is to be performed and
accordingly the operator is used and the answer is stored in a
variable named “res” which has been printed on the screen using
printf().
Learning: Through this program, we learnt about the method to
take input from user that is scanf(), about the if/else statements to
check for multiple cases and the basic arithmetic operators.
PROBLEM 3
Aim: To check if a number is odd or even.
Theory: This program is to check if number entered by the user is
odd or even by checking the remainder of the number when divided
by 2. The remainder will be 0 if the number is even and 1 if the
number is odd.
Code:
#include<stdio.h>
void main()
{
int n;
printf("Enter number");
scanf("%d",&n);
if(n%2==0)
printf("Number is even");
else
printf("Number is odd");
}

Output:
Discussion: In this program, we’ve used the if/else
statement to check the condition for a number entered by
user being even or odd and printing the result.
Learning: We’ve learnt about checking the number for
odd/even according to divisibility by 2 using if/else
statement.

You might also like