C Programming Micro Project
C Programming Micro Project
Submitted by
Under guidance of
Miss: N. P. Joshi
GRWPT
CERTIFICATE
GRWPT
ACKNOWLEDGEMENT
GRWPT
Index
4 Source code 8 to 12
6 Skill developed 16
7 Output of Projects 16
8 Application of microproject 16
GRWPT
PART: A
A MICRO-PROJECT REPORT
Title of Micro-Project: Write menu driven C program to perform
different logical operations according to selected options from
menu.
INTRODUCTION
Menu – driven program C is a type of program in which various options are
provided to the user and some functionality is provided based on these options.
These programs are used to provide a simple yet effective user interface and
deliver the requested functionalities to the user. This article provides an
overview of menu – driven programs in C.
A menu – driven program is simply a program that provides a collection of
options to the user. Based on the choice of the user, a specific set of statements
is executed to provide a good user experience. Systems using menu – driven
programs have limited choices and are more user – centric than other kinds of
programs. Because of the limited and specified type of choice, these systems are
less prone to user errors and are more user – friendly than command-line
interfaces
GRWPT
AIM: Write menu driven C program to perform different logical operations
according to selected options from menu.
Course Outcome
LITERATURE REVIEW:
C programming know as basic and base of programming language with respect to the use of
this language related a program that help with finding out numeric characteristic of the
number which are passed through this program. It identifies with imported logic
programmatic logic of identifying entered number is factorial, Prime or Even/Odd.
PREPOSED METHODOLOGY
GRWPT
RESOURCES USED:
USED BOOK:
NAME OF SUBJECT NAME OF AUTHOR
https://www.w3school.com
https://stackoverflow.com
ACTION PLAN: -
GRWPT
Source code:
#include<stdio.h>
int main()
{
printf("\n\n\t\t Write menu driven C program to perform different logical
operations according to selected options from menu. \n\n\n");
while(1)
{
printf("1. Factorial \n");
printf("2. Prime\n");
printf("3. Odd\\Even\n");
printf("4. Exit\n\n\n");
printf("Enter your choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("Enter number:\n");
scanf("%d", &num);
fact = 1;
for(i = 1; i <= num; i++)
{
fact = fact*i;
}
printf("\n\nFactorial value of %d is = %lu\n\n\n",num,fact);
break;
case 2:
printf("Enter number:\n");
scanf("%d", &num);
if(num == 1)
printf("\n1 is neither prime nor composite\n\n");
for(i = 2; i < num; i++)
GRWPT
{
if(num%i == 0)
{
printf("\n%d is not a prime number\n\n", num);
break;
}
}
/*
Not divisible by any number other
than 1 and itself
*/
if(i == num)
{
printf("\n\n%d is a Prime number\n\n", num);
break;
}
case 3:
printf("Enter number:\n");
scanf("%d", &num);
case 4:
printf("\n\n\t\t\tCoding is Fun !\n\n\n");
exit(0); // terminates the complete program execution
}
}
printf("\n\n\t\t\tCoding is Fun !\n\n\n");
return 0;
}
GRWPT
Program Screenshots:
GRWPT
GRWPT
Output:
GRWPT
PART: B
Importance of C programming.
• Competency
GRWPT
Performing C programming using Turbo C ++ Application
Step 1: Open turbo C IDE (Integrated Development Environment), click
on File and then click on New
GRWPT
Step 3: Click on Compile menu and then on Compile option, or press the
keys press Alt + F9 to compile the code.
Step 4: Click on Run or press Ctrl + F9 to run the code. Yes, C programs are
first compiled to generate the object code and then that object code is Run.
GRWPT
Actual Resource Used:
Skill development
• We are Skill developing to create a microproject on Microsoft Word.
• We are Skill developing use various types of tools are using
microproject.
• We are Skill development of group discussions.
• We also skill developing reading information about C programming.
Examples, (creating environment for C programming, logical and
arithmetic expressions use in programming, writing program then
compiling, debugging and executing.)
• We also skill developing how to solve errors occurred during
debugging of program.
• We also skill developing how to creating logical expression for
programming.
• We also skill developing how use declaration and data types.
Output of projects
Written menu driven C program to perform different logical operations
according to selected options from menu.
• To identify factorial number
• To identify Prime number
• To identify either given number is odd or even.
GRWPT
• In this micro project we do not need to write any factorial, prime and
even or odd value program again and again.
• With option selection method its easy to use any option.
GRWPT
GRWPT