answersLogoWhite

0


Best Answer

Enter values and end of the list enter -1 to see output. but execute it at command line.

<?php

function readData(){

fwrite(STDOUT, "Please enter your name\n");

// Read the input

$name = fgets(STDIN);

if($name != -1)

readData();

fwrite(STDOUT, "Hello $name");

return;

}

readData();

?>

start

num Sub

num Size = 10

index = 0

while index<10

index = index + 1

endwhile

while index > 0

index = index - 1

endwhile

print Sub

stop

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

This is C++ Code:

#include <iostream>

using namespace std;

int main()

int x = 10;

for(int i = 0; i > 0; i++)

cout << x;

x = x - 1;

return 0;

-- this might be something easier to understand:

start

num Sub

num Size = 10

index = 0

while index<10

index = index + 1

endwhile

while index > 0

index = index - 1

endwhile

print Sub

stop

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

/n make by dibyendu/n

#include<stdio.h>

#include<conio.h>

main()

{

int j,n;

clrscr();

printf("Enter a number");

scanf("%d",&n);

for(j=n;j>=0;j--)

{

printf("%d\n",j);

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

First, create an array to hold the answers:

int answers [10] ;
int count = 0 ;

The count will contain the index into the number of answers given. Then, after all the values have been input, simply count backward in a loop to give the reversed order of entering:

for (int x = count; x > 0; x--)
{
printf ("Value : %d\n", answers [x]) ;
}

That's it!

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

import java.util.*;

class reverse

{

public static void main(String args[])

{

System.out.println("Enter the elements ");

for(int i=0;i<10;i++)

int a[i]=sc.nextInt();

System.out.println("you entered the array is");

for(int i=0;i<10;i++)

System.out.println(a[i]);

System.out.println(" the reverse order array is");

for(i=9;i>=0;i--)

System.out.println(a[i]);

}

}

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

#include<stdio.h>

#include<conio.h>

void main()

{

int i,j;

clrscr();

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

{

printf("%d\t",i);

}

for(j=10;j>=1;j--)

{

printf("%d\t",j);

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Pseudo-code is an informal method of describing an algorithm in language, but the chosen language can be anything. Key to pseudo-code is to describe the algorithm unambiguously and intuitively, and free from knowledge or constrains of a particular human language or programming language.

As an example, an algorithm which counts down from 10 to 1 could be described like so:

for each whole number N, counting down from 10 to 1 in steps of 1:

print N next number N

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

The simplest solution is to use a stack

stack s

// input 10 numbers

for i = 1 to 10 inclusive

input n

s.push (n)

next i

// print numbers in reverse order

for i = 1 to 10 inclusive

print s.top()

s.pop()

next i

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

int i=10;

while (i>0) {

printf ("%d\n", i);

i--;

}

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

let n = 10

while n >= 1

{

print n

let n = n - 1

}

end while

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Design the logic code for program to print numbers in reverse order from 10 down to 1?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What tools can you can use to design program logic?

paper plaintext


What are the answers for Programming logic and design chapter 6?

program calculates


When was Reverse Logic - album - created?

Reverse Logic - album - was created in 1981.


What is the logic circuit for a full adder using only NAND gate?

by the procedure design a half subtractor design a logic ciruit to add two numbers with five bits each drawthe logic diagram of afull adder using using NAND gates only ?


What is a diagram that graphically depicts the steps that take place in a program?

Flowchart pg 32 Programming Logic and Design by Tony Gaddis


What has the author Krome Barratt written?

Krome Barratt has written: 'Logic and design' -- subject(s): Design 'Logic and Design, Revised'


Who studies logic design?

If you mean Logic as in Electronics, Computers etc... Then Electrical and Electronics Engineers study Logic design including True/False equations, AND/OR/NAND/NOR Gates. Logic design is essential for Electronic/Microprocessor and other electronic equipment design tasks. Entire computers of any complexity can be broken down to individual logic elements.


What is the process of logic without numbers?

Most studies in logic: Boolean algebra, predicate logic etc are independent of numbers.


Need of program Logic controllers?

Program logic controllers are used to control the operation of most systems.


What has the author Frederic J Mowle written?

Frederic J. Mowle has written: 'A systematic approach to digital logic design' -- subject(s): Logic circuits, Logic design


A debugging process in which you imagine that you are the computer executing a program is called?

Hand Tracing Page 63 Programming Logic and Design by Tony Gladdis


What has the author Arthur D Friedman written?

Arthur D. Friedman has written: 'Fundamentals of logic design and switching theory' -- subject(s): Logic circuits, Logic design, Switching theory