You are on page 1of 14

K L UNIVERSITY

FRESHMAN ENGINEERING DEPARTMENT


Department of BES-1
A Project Based Lab Report

On

LUCKY TRANSFORMATIONS

SUBMITTED BY:

I.D NUMBER NAME

2100030387 N.HEMA SRI LAKSHMI

2100030411 P.FAAIRAZ KHAN

2100030430 P.V.BRAHAMA REDDY

2100040431 P.ANJALI PRASAD

UNDER THE ESTEEMED GUIDANCE OF

<SREERAM NIMMAGADDA>

COURSE CO-ORDINATOR

KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES

CERTIFICATE

This is to certify that the project based laboratory report entitled


“<TITLE>” submitted by Mr./Ms. <name> bearing Regd. No. <REGD.NO> to
the Department of Basic Engineering Sciences, KL University in partial
fulfillment of the requirements for the completion of a project based
Laboratory in “Computational Thinking for Structured Design” course in I B
Tech I Semester, is a bonafide record of the work carried out by him/her under
my supervision during the academic year 2021 – 2022.

PROJECT SUPERVISOR HEAD OF THE DEPARTMENT

< SREERAM> Dr. D.HARITHA


ACKNOWLEDGEMENTS

It is great pleasure for me to express my gratitude to our honorable


President Sri. Koneru Satyanarayana, for giving the opportunity and platform
with facilities in accomplishing the project based laboratory report.

I express the sincere gratitude to our Director Dr. A. Jagdeesh for his
administration towards our academic growth.

I express sincere gratitude to our Coordinator and HOD-BES Dr.


D.Haritha for her leadership and constant motivation provided in successful
completion of our academic semester. I record it as my privilege to deeply
thank for providing us the efficient faculty and facilities to make our ideas into
reality.

I express my sincere thanks to our project supervisor <name> for


his/her novel association of ideas, encouragement, appreciation and
intellectual zeal which motivated us to venture this project successfully.

Finally, it is pleased to acknowledge the indebtedness to all those who


devoted themselves directly or indirectly to make this project report success.

Name: ANJALI

Regd . No: 2100030431


ABSTRACT

In our project “LUCKY TRANSFORMATION” we deal with lucky numbers and arrays. Lucky numbers
are the numbers formed with only some particular digits and no other digit should be intervened.
This program deals with the transformation of the digits of the given lucky number as per the
given conditions. It had undergone through program design , program coding and program
testing .This program is to help PETYA,the boy in the program with his lucky numbers. In this
program we used strings instead of arrays as we have to sort and swap the digits of a number, if
we had sort or swap numbers instead of digits we would have used arrays. In this program we
sorted the digits of the number whenever 4,7 come side by side under given conditions. When the
no of digits in the given number are odd and if 4,7 are side by side we transform both of them as 4
or else we transform them as 7. This process should be continued k number of times and the
transformed string should be displayed. K is given in the input.
INDEX
S.NO TITLE PAGE NO
1 Introduction <pageno>
2 Aim of the Project 6
2.1 Advantages & Disadvantages 7-8
2.2 Future Implementation 9
3 Software & Hardware Details 10
4 Data Flow Diagram 11
5 Implementation 12
6 Algorithm for each module 13
7 Integration and System Testing 14
8 Conclusion 15

INTRODUCTION

Lucky numbers are the numbers formed with only some particular digits and no other digit
should be intervened. This program deals with the transformation of the digits of the given lucky
number as per the given conditions. It had undergone through program design , program coding
and program testing .This program is to help PETYA,the boy in the program with his lucky
numbers. In this program we used strings instead of arrays as we have to sort and swap the digits
of a number, if we had sort or swap numbers instead of digits we would have used arrays. In this
program we sorted the digits of the number whenever 4,7 come side by side under given
conditions. When the no of digits in the given number are odd and if 4,7 are side by side we
transform both of them as 4 or else we transform them as 7. This process should be continued k
number of times and the transformed string should be displayed. K is given in the input. C was
originally developed at Bell Labs by Dennis Ritche between 1972 and 1973 to make utilities
running on Unix. Later, it was applied to re- implementing the kernel of the Unix operating system.
During the 1980s, C gradually gained popularity. Nowadays, it is one of the most widely used
programming languages, with C compilers from various vendors available for the majority of
existing computer architectures and operating systems. C has been standardized by the ANSI since
1989 (see ANSI C) and by the International Organization for Standardization. C is an imperative
procedural language. It was designed to be compiled using a relatively straightforward compiler to
provide low-level access to memory and language constructs that map efficiently to machine
instructions, all with minimal runtime support. Despite its low-level capabilities, the language was
designed to encourage crossplatform programming. A standards-compliant C program written
with portability in mind can be compiled for a wide variety of computer platforms and operating
systems with few changes to its source code. The language is available on various platforms, from
embedded microcontrollers to supercomputers. C language always is popular now during
programming industry meanwhile C++, Java languages are also in the top 3 as well as the C
language. By this time let us discuss about its advantages and disadvantages. Every code or
programming language own its advantage, at the same time along with its development and
optimization its disadvantages and in-adaptability will embody. At the beginning, let us discuss its
advantages, then subsequently it is about the disadvantages of the C language.

AIM

Advantages:-
1. Concision and compact, flexibility and convenience There are only 32 keywords and 9 control
statements in C language. The program is free to write and case sensitive (lowercase and capital).
Combine the basic structure and statement of high-level language with the practicality of low-level
language. C language can operate on bits, bytes and addresses like assembly language, which are
the most basic unit of work of a computer. 2. Operators richness The operators of the C language
contain a wide range of 34 operators. The C language handles parentheses, assignment, forced
type conversion, and so on. As a result, the C language has very rich computing types and various
expression types. Using various operators flexibly can achieve some operation, but other high-
level languages. 3. Data type rich The data types of the C language include integer type, real type,
character type, array type, pointer type, structure type, union type, etc. It can be used to
implement various complex data structures. The concept of pointer is also introduced to make the
program more efficient. 4. Good program portability C compiler of C language on different
computers, is about 86% of the code as common, so the C language compiler is portable. 5. Allows
direct access to physical addresses, to operate on hardware Since C language allows direct access
to physical addresses and can operate directly on hardware, it has both functions of high-level
languages and many functions of low-level languages. It can operate to bits, bytes, and addresses
like assembly language, which are the most basic unit of work of a computer and can be used to
write system software.

Disadvantages:-
1. The disadvantage of C language mainly lies in the encapsulation of data, which makes C have
great disadvantage in data security, which is also different from C and C++. 2. The syntax
restriction of the C language is not strict, the type restriction of variable is not strict, the security of
program is affected, and the array subscript out of bounds is not checked. From the perspective of
application, the C language is more difficult to master than other high-level languages. That is to
say, people who use C language need to be more proficient in programming.

Future enhancements:-
We can make the Modern Periodic Table in C language by using three or more header files
or many data types such as: 1. #include: This header file will contain scanf()-which is used
take input from keyboard while running program, printf()-which is used to print output
while running program, and many more. 2. #include: This header file will contain clrscr()-
which is used to clear screen while running program, getch(),which is used to show
characters while running program, and many more. 3. #include: This header file will contain
some string based operations such as strcmp()which is used to compare strings, and many
more.

SYSTEM REQUIREMENTS
 SOFTWARE REQUIREMENTS:
The major software requirements of the project are as follows:
Language : Turbo-C
Operating system: Windows Xp or later.

 HARDWARE REQUIREMENTS:
The hardware requirements that map towards the software are as
follows:

RAM : 16GB

Processor : I5

DATA FLOW DIAGRAM


ALGORITHM
Step 1: start

Step 2: Define int variables n, k, i,d[100];

Step 3: Read the variables.

Step 4: while(k--)

Step 4.1: for(i=1;i<=n;i++)

Step 4.2: If d[i] is equal to 4 and d[i+1] is equal to 7

Step 5: If (i%2!==0)

Step 5.1: Assign 4 as the value of d[i] and d[i+1]

Step 6: Else if (i%2==0 )

Step 6.1: Assign 7 as the value of d[i] and d[i+1]

Step 7: Display the array d

Step 8: Stop

IMPLEMENTATION
#includde<stdio.h>

int main()

int n,I,k;

scanf(“%d”,&n);

scanf(“%d”,&k);

int d[n];

for(i-1;i<=n;i++)

scanf(“%d”,&d[i]);

while(k--)

for(i=1;i<=n;i++)

if(a[i]==4&&a[i+1]==7)

if(i%2!=0)

d[i]=4;

d[i+1]=4;

break;

else if(i%2==0)

d[i]=7;

d[i+1]=7;
break;

For(i=1;i<=n;i++)

Printf(“%d”,d[i]);

INTEGRATION AND SYSTEM TESTING


OUTPUTS
Screen Shots:

CONCLUSION
We have completed this project by using numbers sorting and transformations. This

program can be further made easy by using c++ or python. For now we have created

a lucky number transformer that transforms digits under given conditions

You might also like