[go: up one dir, main page]

0% found this document useful (0 votes)
36 views1 page

EE124 Assignment I

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

R.V.R & J.

C COLLEGE OF ENGINEERING (AUTONOMOUS)


CHOWDAVARAM, GUNTUR-522019.
EE-124 - PROGRAMMING FOR PROBLEM SOLVING
ASSIGNMENT TEST- I
AcademicYear:2022-23 TIME : 45Min
I/IV B.TECH (II- SEM) MAX.MARKS :12M

1) a) Define flowchart and discuss the different symbols used in flow chart. 3M CO1
b) Write an Algorithm and program to find the roots of the quadratic equation. 3M CO1
2) a) Explain about the structure of C program 3M CO1
b) Write a c program to swap two numbers. 3M CO1
3) a) Discuss about the different types of operators used in c programming with suitable 4M CO1
examples.
b) Develop a C program for the scenario, Mr. Gupta deposited Rs.1000 in a bank. 2M CO1
The bank gives simple interest rate of 15% per annum. Write a program to
determine the amount in Mr. Gupta’s account at the end of 5 years.
4) a) Write a C program for solving the following problem: 3M CO2
Your library needs your help. Given expected and actual return dates for library
book, the program calculates the fine(if any). The fee structure is as follows:
i) If the book is returned on or before the expected return date, no fine will be
charged i.e fine=0
ii) If the book is returned after the expected date of return day but still within
the calendar month and year as expected return date, fine = Rs.(15*number
of days late)
iii) If the book is returned after the expected date of return month but still within
the calendar year and as expected return date, fine = Rs.(50*number of
months late)
iv) If the book is returned after the calendar yearin which it was expected, there
is a fixed fine of Rs.1000.
b) Develop a C program using switch statement, which takes two integer numbers 3M CO2
and one operator as input from the user, performs the operation on those 2
numbers and then print the result.(Consider the operators +,-,*,/,%)
5 a) Compare the use of the if - else statement with the use of the conditional (?:) 3M CO2
operator. In particular, in what way can the ?: operator be used in place of an if -
else statement?
b) Develop a C program for multiplication table of a number from 1 to a given range. 3M CO2
6) a) What is the purpose of the for statement? How does it differ from the while 4M CO2
statement and the do - while statement?
b) Write a program to print Fibonacci series up to given number 2M CO2

You might also like