answersLogoWhite

0


Best Answer

in PHP:

for($n = 5; $n >= 1; $n--){

for($m = 5; $m >= $n; $m--){

echo $m;

}

echo " ";

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you print 5 54 543 5432 54321?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you sort the following using a C for loop 5 54 543 5432 54321?

#include<stdio.h> #include<conio.h> void main() { int i, j,n; printf("Enter The Number:- "); scanf("%d",&n); for(i=n;i>=1;i--) { for(j=n;j>=i;j--) { printf("%d",j); } printf("\n"); } getch(); }


How are the tablets marked?

54 543


What is the street price for roxicet 54 543?

$2.50


How can you print 5 54 543 5432 54321 in java using for loop?

With two nested loops. In the outer loop, a variable - we might call it "n" - would go from 5 down to 1, in the inner loop, the variable (whatever you call it) goes from 5 down to n. Write out each digit in the inner loop; in the outer loop you need to add the extra space.


543 country code?

If you are referring to telephone country codes, then there is no country with code 543. Within Agentina (country code 54), if the next digit is a 3, ie you have dialled +543, then further digits dialled will give a number in: +54 30 - a mobile phone +54 32 - a mobile phone +54 33 - a mobile phone +54 341 - Rosario +54 342 - Santa Fe +54 351 - Cordoba +54 352 - Cordoba +54 361 - Mendoza +54 3627 - San Rafael +54 364 - San Juan +54 3722 - Resistenci +54 3752 - Posadas +54 3783 - Corrientes


What is 54.3 as a fraction?

You can write it as 54 and 3/10 or 543/10.


Is a roxicet 54-543 stronger then a percocet 10-325?

54-543 is just the marking on the pill. 10-325 is the amount of oxycodone (10) to APAP (325). So long story short, no it is not, 54-325 is the next level down generic.


What are the divisors of 543?

There are eight divisors of 54: 1, 2, 3, 6, 9, 18, 27, 54.


How do you convert bases by using c plus plus?

The algorithm to convert from decimal to any other base is the same regardless of the base. Divide the decimal value by the base and take the remainder. This is the least significant digit. Repeatedly divide the result of the previous division by the base to get the next least significant digit, and so on until the result is zero. Converting from any non-decimal base to any other base is slightly more difficult because C++ only recognises decimal and hexadecimal values (which are obviously converted to and from binary for our convenience). However since we must use character arrays to represent all other bases, the simplest solution is to convert those strings to decimal and then convert to the required base using the previously mentioned algorithm. The following program provides 2 functions which allow relatively simple conversion from decimal to any base from 2 to 62, and back to decimal again. Note that Dec2Base() returns a null-terminated character array of the exact size required which can then be passed to Bin2Dec() to produce the original decimal value. Between these two functions you can convert from any base to any other base in the range 2 to 62. The test program output is shown at the bottom of the example. #include <iostream> // Convert to any base from 2 to 62 inclusive. const char MAXBASE = 62; // Note: Higher bases are possible, but we only have 61 symbols // to play with (0-9, A-Z and a-z). Bases 11 through 36 are not // case-sensitive (although we will use upper-case here), while // higher bases use upper-case for the digits 10 through 35 and // lower-case for the digits 36 through 61. // Note that negative values use the '-' symbol, even in binary. // Computers do not. Computers represent the value -1 as being // 10000000 in 8-bit binary (the most significant bit represents // the sign). The value -0 does not exist hence the least // significant bit is zero, not 1 as might be expected. However, // we humans can use the '-' symbol to differentiate positive // and negative decimal values, so there's no reason not to // follow this convention with all bases. // Convert the given signed decimal value to the given base and // return the buffer pointed to by the non-zero pointer to pointer. char * Dec2Base( int dec, char base, char ** buffer ) { // The pointer-to-pointer MUST be non-zero. if( !buffer ) return( 0 ); // Point to the actual buffer (may be NULL). char * p = *buffer; // Check validity. if( dec && base > 1 && base <= MAXBASE ) { // Some variables. unsigned int size = 1; int rem = dec; // Is the value signed? if( rem < 0 ) { // Increase the initial size to cater for sign. ++size; // Convert the value to a positive value. rem = dec *= -1; } // Release the buffer, if required. if( p ) free( p ); // Calculate the required buffer size. while( rem /= base ) ++size; // Allocate a null-terminated buffer and zero it. p = ( char * ) malloc( ++size ); memset( p, 0, size-- ); // Update the output parameter. if( *buffer != p ) *buffer = p; // Point to the null terminator. p += size; // Start with the least-significant first. while( dec ) { // Step back to the correct character. --p; // Determine the digit value (remainder of division). rem = dec % base; // Determine the symbol. if( rem < 10 ) *p = '0' + rem; else if( rem < 36 ) *p = 'A' + rem - 10; else *p = 'a' + rem - 36; // Prepare for next digit. dec /= base; } // Signed value? if( p != *buffer ) { --p; *p = '-'; } } // Return the buffer. return( *buffer = p ); } int Base2Dec( char * buffer, char base ) { // Initialise the return value. int decimal = 0; // The buffer MUST BE null-terminated! unsigned int size = strlen( buffer ); // Point to the null-terminator. char * p = buffer; p += size; // The least-significant column is always the units, // with position value 1. unsigned int posval = 1; // Repeat until we reach the most-significant digit. while( p != buffer ) { // Step back to the digit. --p; // Store the the digit's value unsigned int val = *p; // Is it a sign? if( val == '-' ) // Adjust the result. decimal *= -1; // Not a sign, must be a digit. else { // Convert the digit to a decimal value. if( val > 'a' ) { val -= 'a'; val += 36; } else if( val > 'A' ) { val -= 'A'; val += 10; } else val -= '0'; // Multiply by the position value. val *= posval; // Increment the result. decimal += val; // Calculate the next position value. posval *= base; } } // Success. return( decimal ); } // Test program. int main() { // The test value: int decimal = -54321; // Initialise a pointer. char * buffer = 0; // Compute all bases from 2 through MAXBASE. char base = 1; while( ++base <= MAXBASE ) printf( "%d in decimal is %s in base %u\n", decimal, Dec2Base( decimal, base, &buffer ), base ); // Convert from MAXBASE back to decimal: printf( "%s in base %d is %d in decimal\n", buffer, MAXBASE, Base2Dec( buffer, MAXBASE )); // Don't forget to release the buffer! if( buffer ) free( buffer ); // Success! return( 0 ); } Output: -54321 in decimal is -1101010000110001 in base 2 -54321 in decimal is -2202111220 in base 3 -54321 in decimal is -31100301 in base 4 -54321 in decimal is -3214241 in base 5 -54321 in decimal is -1055253 in base 6 -54321 in decimal is -314241 in base 7 -54321 in decimal is -152061 in base 8 -54321 in decimal is -82456 in base 9 -54321 in decimal is -54321 in base 10 -54321 in decimal is -378A3 in base 11 -54321 in decimal is -27529 in base 12 -54321 in decimal is -1B957 in base 13 -54321 in decimal is -15B21 in base 14 -54321 in decimal is -11166 in base 15 -54321 in decimal is -D431 in base 16 -54321 in decimal is -B0G6 in base 17 -54321 in decimal is -95BF in base 18 -54321 in decimal is -7H90 in base 19 -54321 in decimal is -6FG1 in base 20 -54321 in decimal is -5I3F in base 21 -54321 in decimal is -5253 in base 22 -54321 in decimal is -4AFI in base 23 -54321 in decimal is -3M79 in base 24 -54321 in decimal is -3BML in base 25 -54321 in decimal is -3297 in base 26 -54321 in decimal is -2KDO in base 27 -54321 in decimal is -2D81 in base 28 -54321 in decimal is -26H4 in base 29 -54321 in decimal is -20AL in base 30 -54321 in decimal is -1PG9 in base 31 -54321 in decimal is -1L1H in base 32 -54321 in decimal is -1GT3 in base 33 -54321 in decimal is -1CXN in base 34 -54321 in decimal is -19C1 in base 35 -54321 in decimal is -15WX in base 36 -54321 in decimal is -12P5 in base 37 -54321 in decimal is -bNJ in base 38 -54321 in decimal is -ZRX in base 39 -54321 in decimal is -Xc1 in base 40 -54321 in decimal is -WCb in base 41 -54321 in decimal is -UXF in base 42 -54321 in decimal is -TGC in base 43 -54321 in decimal is -S2P in base 44 -54321 in decimal is -Qb6 in base 45 -54321 in decimal is -PUf in base 46 -54321 in decimal is -ORa in base 47 -54321 in decimal is -NRX in base 48 -54321 in decimal is -MUT in base 49 -54321 in decimal is -LaL in base 50 -54321 in decimal is -Kj6 in base 51 -54321 in decimal is -K4X in base 52 -54321 in decimal is -JHn in base 53 -54321 in decimal is -IXp in base 54 -54321 in decimal is -Hqa in base 55 -54321 in decimal is -HI1 in base 56 -54321 in decimal is -Gf0 in base 57 -54321 in decimal is -G8X in base 58 -54321 in decimal is -FZf in base 59 -54321 in decimal is -F5L in base 60 -54321 in decimal is -EaV in base 61 -54321 in decimal is -E89 in base 62 -E89 in base 62 is -54321 in decimal


What is the gcf of 54 and 45 in a tree?

4515,35,3,35427,29,3,23,3,3,23 x 3 x 5 = 452 x 3 x 3 x 3 = 543 x 3 = 9, the GCF


How old is Konrad Mutian?

Konrad Mutian was born on October 15, 1471 and died on March 30, 1526. Konrad Mutian would have been 54 years old at the time of death or 543 years old today.


Where can i find a print of an oil on canvas of Al Bertram's intitled Reminiscence?

we have a print #54-850 in-titled Reminiscence bye AL Bertram signed contact jdukedog@yahoo.com sold!