SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 1
A C program to generate Telephone Bill for
Consumer – IGNOU MCAAssignment 2015 – 16
MASTER OF COMPUTER APPLICATIONS
Course Code : MCSL-017
Course Title : C and Assembly Language Programming (Lab Course)
Assignment Number : MCA(I)/L-017/Assignment/15-16
Maximum Marks : 100
Weightage : 25%
Write an interactive program in C language to create an application program which
generates the telephone bills. It stores various details of users Telephone Number, Name,
Address, No. of calls, local or STD/ISD call. Compute the amount to be paid if the charges
per local call is Rs. 2/- and for STD/ISD call is Rs. 5/-. It should have feature of searching
the customer records using the telephone number. The application should be designed
user-friendly.
Note: You must execute the program and submit the program logic, sample input and output
along with the necessary documentation for this question. Assumptions can be made wherever
necessary.
#include<stdio.h>
#include<dos.h>
struct consumer
{
int TEL_NO;
char NAME[10];
char ADDRESS[25];
int LOCAL;
int STD_ISD;
}USER[12]={
{25621,”GANESH”,”KACHPADA,MALAD W”,15,5},
{25622,”MAHESH”,”DOMNIC COLONY,MALAD W”,30,0},
{25623,”SURESH”,”SUNDER NAGAR MALAD W”,128,15},
{25624,”KALPESH”,”KACHPADA,MALAD W”,826,7},
{25625,”RAHUL”,”DOMNIC COLONY,MALAD W”,24,3},
{25626,”SUBBU”,”SUNDER NAGAR MALAD W”,475,0},
{25627,”RAKESH”,”BHADRAN NAGAR MALAD W”,97,7},
{25628,”ATUL”,”KACHPADA,MALAD W”,152,45},
{25629,”DHARMESH”,”SUNDER NAGAR MALAD W”,326,45},
{25630,”AJAY”,”BHADRAN NAGAR MALAD W”,216,12},
{25631,”ABDUL”,”DOMNIC COLONY,MALAD W”,127,1},
{25632,”RASHMI”,”KACHPADA,MALAD W”,95,5}
};
void main()
{
int TELNO;
void gen_bill(int);
clrscr();
printf(“ENTER TELEPHONE NO.(BTWN 25621 TO 25632) TO GENERATE BILL : “);
scanf(“%d”,&TELNO);
if(TELNO>25620 && TELNO<25633)
gen_bill(TELNO);
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 2
else
printf(“nYOU HAVE ENTERED WRONG TEL NO. !!”);
getch();
}
void gen_bill(int TELNO)
{
struct date D;
float LOCAL_CH,STD_ISD_CH,SER_CH,T_CALLS,T_BILL,FIX_CH=750;
getdate(&D);
printf(“nnttt MUMBAI TELEPHONE NIGAM LIMITED.”);
printf(“ntttt**BILL SUMMARY**nn”);
LOCAL_CH=USER[TELNO-25621].LOCAL*2;
STD_ISD_CH=USER[TELNO-25621].STD_ISD*5;
T_CALLS=LOCAL_CH+STD_ISD_CH;
SER_CH=(FIX_CH+T_CALLS)/10;
T_BILL=FIX_CH+T_CALLS+SER_CH;
printf(“tCONS.NAME : %stttBILL GEN. DATE:%d/%d/%d “,USER[TELNO-
25621].NAME,D.da_day,D.da_mon,D.da_year);
printf(“nntADDRESS : %sttBILL MONTH : %d %dn”,USER[TELNO-
25621].ADDRESS,D.da_mon-1,D.da_year);
printf(“nt_____________________________________________________________________
_”);
printf(“nntNO. OF CALLSttttCHARGESttAMOUNT(RS.)”);
printf(“nt_____________________________________________________________________
_”);
printf(“nntLOCAL :t%dtttMONTHLY(FIXED) :t%.0f”,USER[TELNO-25621].LOCAL,FIX_CH);
printf(“nntSTD/ISD :t%dtttCALL USAGE :t%.0f”,USER[TELNO-25621].STD_ISD,T_CALLS);
printf(“nnttttttSERVICE TAXtt%.0f”,SER_CH);
printf(“nt_____________________________________________________________________
_”);
printf(“nnttttttPAYABLE AMTtt%.0f”,T_BILL);
printf(“nt_____________________________________________________________________
_”);
}
Code: -
A program in assembly language to find the
perimeter of a rectangle – IGNOU MCAAssignment
2015 – 16
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 3
MASTER OF COMPUTER APPLICATIONS
Course Code : MCS-017
Course Title : C and Assembly Language Programming(Lab Course)
Assignment Number : MCA(I)/L-017/Assignment/15-16
Maximum Marks : 100
Weightage : 25%
Write a program in assembly language to find the perimeter of a rectangle.
DATA SEGMENT
LEN DB ?
BRE DB ?
RES DB 10 DUP (‘$’)
MSG1 DB 10,13,”ENTER LENGTH OF RECTANGLE : $”
MSG2 DB 10,13,”ENTER BREADTH OF RECTANGLE : $”
MSG3 DB 10,13,”SQUARE OF NUMBER IS : $”
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV AH,0
MOV BL,2
MUL BL
MOV LEN,AL
LEA DX,MSG2
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV AH,0
MOV BL,2
MUL BL
MOV BRE,AL
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 4
ADD AL,LEN
LEA SI,RES
CALL HEX2DEC
LEA DX,MSG3
MOV AH,9
INT 21H
LEA DX,RES
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
HEX2DEC PROC NEAR
MOV CX,0
MOV BX,10
LOOP1: MOV DX,0
DIV BX
ADD DL,30H
PUSH DX
INC CX
CMP AX,9
JG LOOP1
ADD AL,30H
MOV [SI],AL
LOOP2: POP AX
INC SI
MOV [SI],AL
LOOP LOOP2
RET
HEX2DEC ENDP
END START
Program Code :
Assembly language program to find the Square of a
number – IGNOU MCAAssignment 2015 – 16
Q. Write a program in assembly language to find the Square of a given number.
Course Code : MCS-017
Course Title : C and Assembly Language Programming(Lab Course)
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 5
Assignment Number : MCA(I)/L-017/Assignment/15-16
Maximum Marks : 100
Weightage : 25%
Solution :
DATA SEGMENT
NUM DB ?
RES DB 10 DUP (‘$’)
MSG1 DB “ENTER NUMBER : $”
MSG2 DB 10,13,”SQUARE OF NUMBER IS : $”
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV NUM,AL
MOV AH,0
MUL NUM
LEA SI,RES
CALL HEX2DEC
LEA DX,MSG2
MOV AH,9
INT 21H
LEA DX,RES
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
HEX2DEC PROC NEAR
MOV CX,0
MOV BX,10
LOOP1: MOV DX,0
DIV BX
ADD DL,30H
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 6
PUSH DX
INC CX
CMP AX,9
JG LOOP1
ADD AL,30H
MOV [SI],AL
LOOP2: POP AX
INC SI
MOV [SI],AL
LOOP LOOP2
RET
HEX2DEC ENDP
END START
An assembly language program to reverse the given
number and check if the number is palindrome –
IGNOU MCAAssignment 2015 – 16
By GangadharKopella | August 16, 2015
0 Comment
MASTER OF COMPUTER APPLICATIONS
Course Code : MCS-017
Course Title : C and Assembly Language Programming(Lab Course)
Assignment Number : MCA(I)/L-017/Assignment/15-16
Maximum Marks : 100
Weightage : 25%
Develop and execute an assembly language program to reverse the given number and
check if the number is palindrome.
DATA SEGMENT
NUM1 DW 12321
NUM2 DW ?
ARRY DB 10 DUP (0)
TEMP DW ?
MSG1 DB 10,13,’STORED NUMBER IN MEMORY IS : $’
MSG2 DB 10,13,’REVERSE NUMBER IS : $’
MSG3 DB 10,13,’NUMBER IS A PALINDROME $’
MSG4 DB 10,13,’NUMBER IS NOT A PALINDROME $’
RES DB 10 DUP (‘$’)
DATA ENDS
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 7
DISPLAY MACRO MSG
MOV AH,9
LEA DX,MSG
INT 21H
ENDM
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
DISPLAY MSG1
MOV AX,NUM1
LEA SI,RES
CALL HEX2DEC
LEA DX,RES
MOV AH,9
INT 21H
LEA SI,ARRY
MOV AX,NUM1
REVE:
MOV DX,0
MOV BX,10
DIV BX
MOV ARRY[SI],DL
MOV TEMP,AX
MOV AX,DX
INC SI
MOV AX,TEMP
CMP TEMP,0
JG REVE
LEA DI,ARRY
LAST:
INC DI
CMP ARRY[DI],0
JG LAST
DEC DI
MOV AL,ARRY[DI]
MOV AH,0
MOV NUM2,AX
MOV CX,10
CONV:
DEC DI
MOV AL,ARRY[DI]
MOV AH,0
MUL CX
ADD NUM2,AX
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 8
MOV AX,CX
MOV BX,10
MUL BX
MOV CX,AX
CMP ARRY[DI],0
JG CONV
DISPLAY MSG2
MOV AX,NUM2
LEA SI,RES
CALL HEX2DEC
LEA DX,RES
MOV AH,9
INT 21H
MOV AX,NUM1
CMP NUM2,AX
JE PALIN
DISPLAY MSG4
JMP FINISH
PALIN:
DISPLAY MSG3
FINISH: MOV AH,4CH
INT 21H
CODE ENDS
HEX2DEC PROC NEAR
MOV CX,0
MOV BX,10
LOOP1: MOV DX,0
DIV BX
ADD DL,30H
PUSH DX
INC CX
CMP AX,9
JG LOOP1
ADD AL,30H
MOV [SI],AL
LOOP2: POP AX
INC SI
MOV [SI],AL
LOOP LOOP2
RET
HEX2DEC ENDP
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 9
END START
A program in assembly language to find the largest
of 3 numbers – IGNOU MCAAssignment 2015 – 16
By GangadharKopella | August 16, 2015
0 Comment
MASTER OF COMPUTER APPLICATIONS
Course Code : MCS-017
Course Title : C and Assembly Language Programming(Lab Course)
Assignment Number : MCA(I)/L-017/Assignment/15-16
Maximum Marks : 100
Weightage : 25%
Write a program in assembly language to find the largest of 3 numbers.
DATA SEGMENT
NUM1 DB 5
NUM2 DB 9
NUM3 DB 7
LRGT DB ?
ENDS
CODE SEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV AL,NUM1
MOV LRGT,AL
CMP AL,NUM2
JGE SKIP1
MOV AL,NUM2
MOV LRGT,AL
SKIP1:
MOV AL,LRGT
CMP AL,NUM3
JGE SKIP2
MOV AL,NUM3
MOV LRGT,AL
SKIP2:
MOV AH,4CH
INT 21H
Ignousolvedassignments.com
Thanks for visiting us!! Subscribe!!  Page 10
ENDS
END START

Mais conteúdo relacionado

Mais procurados

hexadecimal notes By ZAK
hexadecimal notes By ZAKhexadecimal notes By ZAK
hexadecimal notes By ZAKTabsheer Hasan
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Compratorsuraj829
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
Bitwise Operations in Programming
Bitwise Operations in ProgrammingBitwise Operations in Programming
Bitwise Operations in ProgrammingSvetlin Nakov
 
Hexadecimal
HexadecimalHexadecimal
Hexadecimalwardjo
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block CodesNilaNila16
 
Number system logic gates
Number system logic gatesNumber system logic gates
Number system logic gatesJaipal Dhobale
 
Application of bases
Application of basesApplication of bases
Application of basesAbdur Rehman
 
Cse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogrammingCse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogrammingMd. Ashikur Rahman
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006arunachalamr16
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdfmiftah88
 
Data representation
Data representationData representation
Data representationMysore
 
Comparators in DLD.
Comparators in DLD.Comparators in DLD.
Comparators in DLD.Zain Jafri
 

Mais procurados (20)

hexadecimal notes By ZAK
hexadecimal notes By ZAKhexadecimal notes By ZAK
hexadecimal notes By ZAK
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Comprator
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Bitwise Operations in Programming
Bitwise Operations in ProgrammingBitwise Operations in Programming
Bitwise Operations in Programming
 
Hexadecimal
HexadecimalHexadecimal
Hexadecimal
 
Codes
CodesCodes
Codes
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block Codes
 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Number system logic gates
Number system logic gatesNumber system logic gates
Number system logic gates
 
Application of bases
Application of basesApplication of bases
Application of bases
 
Cse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogrammingCse115 lecture02overviewofprogramming
Cse115 lecture02overviewofprogramming
 
Data representation
Data representationData representation
Data representation
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Data representation
Data representationData representation
Data representation
 
Codes r005
Codes  r005Codes  r005
Codes r005
 
Comparators in DLD.
Comparators in DLD.Comparators in DLD.
Comparators in DLD.
 

Destaque (6)

Mcs 013 solve assignment
Mcs 013 solve assignmentMcs 013 solve assignment
Mcs 013 solve assignment
 
Mcs 015 solve assignment
Mcs 015 solve assignmentMcs 015 solve assignment
Mcs 015 solve assignment
 
(Www.entrance exam.net)-ignou mca solved assignment 2011
(Www.entrance exam.net)-ignou mca  solved assignment 2011(Www.entrance exam.net)-ignou mca  solved assignment 2011
(Www.entrance exam.net)-ignou mca solved assignment 2011
 
Mcs 014 solved assignment 2015-16
Mcs 014 solved assignment 2015-16Mcs 014 solved assignment 2015-16
Mcs 014 solved assignment 2015-16
 
gullybaba solved ignou assignments
gullybaba solved ignou assignmentsgullybaba solved ignou assignments
gullybaba solved ignou assignments
 
sets and venn diagrams
sets and venn diagramssets and venn diagrams
sets and venn diagrams
 

Semelhante a Mcs 17 solved assignment 2015- 16

Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)shamim hossain
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3Motaz Saad
 
Introduction to ibm pc assembly language
Introduction to ibm pc assembly languageIntroduction to ibm pc assembly language
Introduction to ibm pc assembly languagewarda aziz
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
The Dynamic Language is not Enough
The Dynamic Language is not EnoughThe Dynamic Language is not Enough
The Dynamic Language is not EnoughLukas Renggli
 
Work in TDW
Work in TDWWork in TDW
Work in TDWsaso70
 
Virtual training optimizing the tick stack
Virtual training  optimizing the tick stackVirtual training  optimizing the tick stack
Virtual training optimizing the tick stackInfluxData
 
APPENDER.ASM;Program APPENDER.ASM Append a short message line.docx
APPENDER.ASM;Program APPENDER.ASM Append a short message line.docxAPPENDER.ASM;Program APPENDER.ASM Append a short message line.docx
APPENDER.ASM;Program APPENDER.ASM Append a short message line.docxrossskuddershamus
 
15CSL48 MP&MC manual
15CSL48 MP&MC manual15CSL48 MP&MC manual
15CSL48 MP&MC manualRLJIT
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualyeshwant gadave
 
Telephone directory in c
Telephone directory in cTelephone directory in c
Telephone directory in cUpendra Sengar
 
stackconf 2022: Are all programming languages in english?
stackconf 2022: Are all programming languages in english?stackconf 2022: Are all programming languages in english?
stackconf 2022: Are all programming languages in english?NETWAYS
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2HarshitParkar6677
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly LanguageAhmed M. Abed
 
AI Deeplearning Programming
AI Deeplearning ProgrammingAI Deeplearning Programming
AI Deeplearning ProgrammingPaulSombat
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answersdebarghyamukherjee60
 

Semelhante a Mcs 17 solved assignment 2015- 16 (20)

Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)Microprocessor and micro-controller lab (assembly programming)
Microprocessor and micro-controller lab (assembly programming)
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3
 
Introduction to ibm pc assembly language
Introduction to ibm pc assembly languageIntroduction to ibm pc assembly language
Introduction to ibm pc assembly language
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
The Dynamic Language is not Enough
The Dynamic Language is not EnoughThe Dynamic Language is not Enough
The Dynamic Language is not Enough
 
Work in TDW
Work in TDWWork in TDW
Work in TDW
 
Alp lcd
Alp lcdAlp lcd
Alp lcd
 
Telephone directory
Telephone directoryTelephone directory
Telephone directory
 
Virtual training optimizing the tick stack
Virtual training  optimizing the tick stackVirtual training  optimizing the tick stack
Virtual training optimizing the tick stack
 
APPENDER.ASM;Program APPENDER.ASM Append a short message line.docx
APPENDER.ASM;Program APPENDER.ASM Append a short message line.docxAPPENDER.ASM;Program APPENDER.ASM Append a short message line.docx
APPENDER.ASM;Program APPENDER.ASM Append a short message line.docx
 
8086 pgms
8086 pgms8086 pgms
8086 pgms
 
15CSL48 MP&MC manual
15CSL48 MP&MC manual15CSL48 MP&MC manual
15CSL48 MP&MC manual
 
Plsql programs(encrypted)
Plsql programs(encrypted)Plsql programs(encrypted)
Plsql programs(encrypted)
 
Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannual
 
Telephone directory in c
Telephone directory in cTelephone directory in c
Telephone directory in c
 
stackconf 2022: Are all programming languages in english?
stackconf 2022: Are all programming languages in english?stackconf 2022: Are all programming languages in english?
stackconf 2022: Are all programming languages in english?
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
AI Deeplearning Programming
AI Deeplearning ProgrammingAI Deeplearning Programming
AI Deeplearning Programming
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answers
 

Mais de Indira Gnadhi National Open University (IGNOU) (14)

Mcs 16 solved assignment 2015-16
Mcs 16 solved assignment 2015-16Mcs 16 solved assignment 2015-16
Mcs 16 solved assignment 2015-16
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
BCSL 057 solved assignments
BCSL 057 solved assignmentsBCSL 057 solved assignments
BCSL 057 solved assignments
 
BCSL 056 solved assignment
BCSL 056 solved assignmentBCSL 056 solved assignment
BCSL 056 solved assignment
 
Bcs 055 solved 2014-15
Bcs 055 solved 2014-15Bcs 055 solved 2014-15
Bcs 055 solved 2014-15
 
Bcs 054 solved assignment
Bcs 054 solved assignmentBcs 054 solved assignment
Bcs 054 solved assignment
 
Bcs 053 solved assignment 2014-15
Bcs 053 solved assignment 2014-15Bcs 053 solved assignment 2014-15
Bcs 053 solved assignment 2014-15
 
Bcs 052 solved assignment
Bcs 052 solved assignmentBcs 052 solved assignment
Bcs 052 solved assignment
 
Mcs 021 solve assignment
Mcs 021 solve assignmentMcs 021 solve assignment
Mcs 021 solve assignment
 
Bcsl 033 solve assignment
Bcsl 033 solve assignmentBcsl 033 solve assignment
Bcsl 033 solve assignment
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
2012 bcsl-021 solve assihnment
2012 bcsl-021 solve assihnment2012 bcsl-021 solve assihnment
2012 bcsl-021 solve assihnment
 
Bcsl 022 solved-assignment_2012-13
Bcsl 022 solved-assignment_2012-13Bcsl 022 solved-assignment_2012-13
Bcsl 022 solved-assignment_2012-13
 
Eco 02 question paper
Eco 02 question paperEco 02 question paper
Eco 02 question paper
 

Último

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 

Último (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

Mcs 17 solved assignment 2015- 16

  • 1. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 1 A C program to generate Telephone Bill for Consumer – IGNOU MCAAssignment 2015 – 16 MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-017 Course Title : C and Assembly Language Programming (Lab Course) Assignment Number : MCA(I)/L-017/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Write an interactive program in C language to create an application program which generates the telephone bills. It stores various details of users Telephone Number, Name, Address, No. of calls, local or STD/ISD call. Compute the amount to be paid if the charges per local call is Rs. 2/- and for STD/ISD call is Rs. 5/-. It should have feature of searching the customer records using the telephone number. The application should be designed user-friendly. Note: You must execute the program and submit the program logic, sample input and output along with the necessary documentation for this question. Assumptions can be made wherever necessary. #include<stdio.h> #include<dos.h> struct consumer { int TEL_NO; char NAME[10]; char ADDRESS[25]; int LOCAL; int STD_ISD; }USER[12]={ {25621,”GANESH”,”KACHPADA,MALAD W”,15,5}, {25622,”MAHESH”,”DOMNIC COLONY,MALAD W”,30,0}, {25623,”SURESH”,”SUNDER NAGAR MALAD W”,128,15}, {25624,”KALPESH”,”KACHPADA,MALAD W”,826,7}, {25625,”RAHUL”,”DOMNIC COLONY,MALAD W”,24,3}, {25626,”SUBBU”,”SUNDER NAGAR MALAD W”,475,0}, {25627,”RAKESH”,”BHADRAN NAGAR MALAD W”,97,7}, {25628,”ATUL”,”KACHPADA,MALAD W”,152,45}, {25629,”DHARMESH”,”SUNDER NAGAR MALAD W”,326,45}, {25630,”AJAY”,”BHADRAN NAGAR MALAD W”,216,12}, {25631,”ABDUL”,”DOMNIC COLONY,MALAD W”,127,1}, {25632,”RASHMI”,”KACHPADA,MALAD W”,95,5} }; void main() { int TELNO; void gen_bill(int); clrscr(); printf(“ENTER TELEPHONE NO.(BTWN 25621 TO 25632) TO GENERATE BILL : “); scanf(“%d”,&TELNO); if(TELNO>25620 && TELNO<25633) gen_bill(TELNO);
  • 2. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 2 else printf(“nYOU HAVE ENTERED WRONG TEL NO. !!”); getch(); } void gen_bill(int TELNO) { struct date D; float LOCAL_CH,STD_ISD_CH,SER_CH,T_CALLS,T_BILL,FIX_CH=750; getdate(&D); printf(“nnttt MUMBAI TELEPHONE NIGAM LIMITED.”); printf(“ntttt**BILL SUMMARY**nn”); LOCAL_CH=USER[TELNO-25621].LOCAL*2; STD_ISD_CH=USER[TELNO-25621].STD_ISD*5; T_CALLS=LOCAL_CH+STD_ISD_CH; SER_CH=(FIX_CH+T_CALLS)/10; T_BILL=FIX_CH+T_CALLS+SER_CH; printf(“tCONS.NAME : %stttBILL GEN. DATE:%d/%d/%d “,USER[TELNO- 25621].NAME,D.da_day,D.da_mon,D.da_year); printf(“nntADDRESS : %sttBILL MONTH : %d %dn”,USER[TELNO- 25621].ADDRESS,D.da_mon-1,D.da_year); printf(“nt_____________________________________________________________________ _”); printf(“nntNO. OF CALLSttttCHARGESttAMOUNT(RS.)”); printf(“nt_____________________________________________________________________ _”); printf(“nntLOCAL :t%dtttMONTHLY(FIXED) :t%.0f”,USER[TELNO-25621].LOCAL,FIX_CH); printf(“nntSTD/ISD :t%dtttCALL USAGE :t%.0f”,USER[TELNO-25621].STD_ISD,T_CALLS); printf(“nnttttttSERVICE TAXtt%.0f”,SER_CH); printf(“nt_____________________________________________________________________ _”); printf(“nnttttttPAYABLE AMTtt%.0f”,T_BILL); printf(“nt_____________________________________________________________________ _”); } Code: - A program in assembly language to find the perimeter of a rectangle – IGNOU MCAAssignment 2015 – 16
  • 3. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 3 MASTER OF COMPUTER APPLICATIONS Course Code : MCS-017 Course Title : C and Assembly Language Programming(Lab Course) Assignment Number : MCA(I)/L-017/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Write a program in assembly language to find the perimeter of a rectangle. DATA SEGMENT LEN DB ? BRE DB ? RES DB 10 DUP (‘$’) MSG1 DB 10,13,”ENTER LENGTH OF RECTANGLE : $” MSG2 DB 10,13,”ENTER BREADTH OF RECTANGLE : $” MSG3 DB 10,13,”SQUARE OF NUMBER IS : $” DATA ENDS CODE SEGMENT ASSUME DS:DATA,CS:CODE START: MOV AX,DATA MOV DS,AX LEA DX,MSG1 MOV AH,9 INT 21H MOV AH,1 INT 21H SUB AL,30H MOV AH,0 MOV BL,2 MUL BL MOV LEN,AL LEA DX,MSG2 MOV AH,9 INT 21H MOV AH,1 INT 21H SUB AL,30H MOV AH,0 MOV BL,2 MUL BL MOV BRE,AL
  • 4. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 4 ADD AL,LEN LEA SI,RES CALL HEX2DEC LEA DX,MSG3 MOV AH,9 INT 21H LEA DX,RES MOV AH,9 INT 21H MOV AH,4CH INT 21H CODE ENDS HEX2DEC PROC NEAR MOV CX,0 MOV BX,10 LOOP1: MOV DX,0 DIV BX ADD DL,30H PUSH DX INC CX CMP AX,9 JG LOOP1 ADD AL,30H MOV [SI],AL LOOP2: POP AX INC SI MOV [SI],AL LOOP LOOP2 RET HEX2DEC ENDP END START Program Code : Assembly language program to find the Square of a number – IGNOU MCAAssignment 2015 – 16 Q. Write a program in assembly language to find the Square of a given number. Course Code : MCS-017 Course Title : C and Assembly Language Programming(Lab Course)
  • 5. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 5 Assignment Number : MCA(I)/L-017/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Solution : DATA SEGMENT NUM DB ? RES DB 10 DUP (‘$’) MSG1 DB “ENTER NUMBER : $” MSG2 DB 10,13,”SQUARE OF NUMBER IS : $” DATA ENDS CODE SEGMENT ASSUME DS:DATA,CS:CODE START: MOV AX,DATA MOV DS,AX LEA DX,MSG1 MOV AH,9 INT 21H MOV AH,1 INT 21H SUB AL,30H MOV NUM,AL MOV AH,0 MUL NUM LEA SI,RES CALL HEX2DEC LEA DX,MSG2 MOV AH,9 INT 21H LEA DX,RES MOV AH,9 INT 21H MOV AH,4CH INT 21H CODE ENDS HEX2DEC PROC NEAR MOV CX,0 MOV BX,10 LOOP1: MOV DX,0 DIV BX ADD DL,30H
  • 6. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 6 PUSH DX INC CX CMP AX,9 JG LOOP1 ADD AL,30H MOV [SI],AL LOOP2: POP AX INC SI MOV [SI],AL LOOP LOOP2 RET HEX2DEC ENDP END START An assembly language program to reverse the given number and check if the number is palindrome – IGNOU MCAAssignment 2015 – 16 By GangadharKopella | August 16, 2015 0 Comment MASTER OF COMPUTER APPLICATIONS Course Code : MCS-017 Course Title : C and Assembly Language Programming(Lab Course) Assignment Number : MCA(I)/L-017/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Develop and execute an assembly language program to reverse the given number and check if the number is palindrome. DATA SEGMENT NUM1 DW 12321 NUM2 DW ? ARRY DB 10 DUP (0) TEMP DW ? MSG1 DB 10,13,’STORED NUMBER IN MEMORY IS : $’ MSG2 DB 10,13,’REVERSE NUMBER IS : $’ MSG3 DB 10,13,’NUMBER IS A PALINDROME $’ MSG4 DB 10,13,’NUMBER IS NOT A PALINDROME $’ RES DB 10 DUP (‘$’) DATA ENDS
  • 7. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 7 DISPLAY MACRO MSG MOV AH,9 LEA DX,MSG INT 21H ENDM CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX DISPLAY MSG1 MOV AX,NUM1 LEA SI,RES CALL HEX2DEC LEA DX,RES MOV AH,9 INT 21H LEA SI,ARRY MOV AX,NUM1 REVE: MOV DX,0 MOV BX,10 DIV BX MOV ARRY[SI],DL MOV TEMP,AX MOV AX,DX INC SI MOV AX,TEMP CMP TEMP,0 JG REVE LEA DI,ARRY LAST: INC DI CMP ARRY[DI],0 JG LAST DEC DI MOV AL,ARRY[DI] MOV AH,0 MOV NUM2,AX MOV CX,10 CONV: DEC DI MOV AL,ARRY[DI] MOV AH,0 MUL CX ADD NUM2,AX
  • 8. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 8 MOV AX,CX MOV BX,10 MUL BX MOV CX,AX CMP ARRY[DI],0 JG CONV DISPLAY MSG2 MOV AX,NUM2 LEA SI,RES CALL HEX2DEC LEA DX,RES MOV AH,9 INT 21H MOV AX,NUM1 CMP NUM2,AX JE PALIN DISPLAY MSG4 JMP FINISH PALIN: DISPLAY MSG3 FINISH: MOV AH,4CH INT 21H CODE ENDS HEX2DEC PROC NEAR MOV CX,0 MOV BX,10 LOOP1: MOV DX,0 DIV BX ADD DL,30H PUSH DX INC CX CMP AX,9 JG LOOP1 ADD AL,30H MOV [SI],AL LOOP2: POP AX INC SI MOV [SI],AL LOOP LOOP2 RET HEX2DEC ENDP
  • 9. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 9 END START A program in assembly language to find the largest of 3 numbers – IGNOU MCAAssignment 2015 – 16 By GangadharKopella | August 16, 2015 0 Comment MASTER OF COMPUTER APPLICATIONS Course Code : MCS-017 Course Title : C and Assembly Language Programming(Lab Course) Assignment Number : MCA(I)/L-017/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Write a program in assembly language to find the largest of 3 numbers. DATA SEGMENT NUM1 DB 5 NUM2 DB 9 NUM3 DB 7 LRGT DB ? ENDS CODE SEGMENT ASSUME DS:DATA CS:CODE START: MOV AX,DATA MOV DS,AX MOV AL,NUM1 MOV LRGT,AL CMP AL,NUM2 JGE SKIP1 MOV AL,NUM2 MOV LRGT,AL SKIP1: MOV AL,LRGT CMP AL,NUM3 JGE SKIP2 MOV AL,NUM3 MOV LRGT,AL SKIP2: MOV AH,4CH INT 21H
  • 10. Ignousolvedassignments.com Thanks for visiting us!! Subscribe!!  Page 10 ENDS END START