1. (B) WRITE A PROGRAM TO FIND THE SUM OF INDIVIDUAL DIGITS IN THE GIVEN 'n'
DIGIT DECIMAL NUMBER.
IDENTIFICATION DIVISION.
PROGRAM-ID. PRO.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 NUM PIC ZZZ9.
77 N PIC 9999.
77 SUM PIC 9(4) VALUE 0.
77 R PIC 9.
77 SUM1 PIC Z(4)9.
PROCEDURE DIVISION.
PARA1.
DISPLAY " ENTER THE NUMBER ".
ACCEPT N.
MOVE N TO NUM.
DISPLAY " ".
DISPLAY " THE NUMBER IS : " NUM.
PERFORM PARA2 UNTIL N = 0.
MOVE SUM TO SUM1.
DISPLAY " ".
DISPLAY " THE SUM OF NUM IS " SUM1.
STOP RUN.
PARA2.
DIVIDE N BY 10 GIVING N REMAINDER R.
COMPUTE SUM = SUM + R.
OUTPUT:
program to find maximum of two numbers using pointers
VBnet program to find the prime numbers between 100 to 200?
for(int i = 1; i < 100; i+=2) { System.out.println(i); }
This would require some computer knowledge. It can make it easier to find out the prime numbers without figuring it out in your head.
Yes, do write. That's what you always have to do when you have got a homework-program.
write an assembly language program to find sum of N numbers
program to find maximum of two numbers using pointers
VBnet program to find the prime numbers between 100 to 200?
k
Each question carries 10 marks. Explain the environment Division with example. Explain the Data Division with an example. Explain the various types of Move statements. Write a COBOL program to find a given integer is odd or even. An input file consists of the following Employee name, Employee number, Basic pay. Write a COBOL program to create an Indexed file which consists of Employee-name, Employee-number, Basic-pay and DA (DA = 25% of Basic-pay) Assume that an organisation has 20 departments. Each department has 5 stores. You are provided with total monthly sales of each stores for the month December 2000. Write a COBOL program to read the data, to write the sales report department wise and also write the total sales of the organisation.
i need this answer
Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.
Since there is an infinite set of prime numbers the answer would be infinity.
for(int i = 1; i < 100; i+=2) { System.out.println(i); }
COBOL was originally designed by Grace Hopper and is on of the oldest programming languages. The name stands for Common Business Orientated Language. More information can be found at websites such as Wikipedia.
write a vb program to find the magic square
please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.