answersLogoWhite

0


Best Answer

05 REM BASIC code

10 CLS: G$ = "a b c d e "

20 FOR N = 0 to 8 STEP 2

30 PRINT MID$(G$, 1, 10 - N); : PRINT

40 NEXT N

50 PRINT: PRINT "Bowie, Zatman, that was fun!"

60 PRINT: END

<?php

// PHP code

$parts = array();

for($n = ord('f'); $n > ord('a'); $n--){

for($m = ord('a'); $m < $n; $m++){

$parts[] = chr($m);

}

}

echo implode(' ', $parts) . "\n";

/* C code */

#include <stdio.h>

int main(int argc, char *argv[]){

int n, m;

n = 5;

while(n > 1){

for(m = (int)'a'; m < (int)'a' + n; m++){

printf("%c ", (char)m);

}

}

printf("\n");

return 0;

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How write the given program a b c d e a b c d a b c a b a?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a 'c' program to fine a largest of three numbers?

largest of a, b, c :a > b ? a > c ? a : c : b > c ? b : c


Write a C program to extract a given word from a file?

program to extract a given word from a file


Write a Program in lisp to find maximum of three numbers?

(defun max3 (a b c) (cond ((&gt; a b) (cond ((&gt; a c) a) (t c))) ((&gt; b c) b) (t c) ) )


Do I need to write a program to find a substring in a given string in c plus plus?

No.


How do you write a c program to show How many Friday the 13th are there in a given year?

165


How do you write a program in C to swap two variables without using the third one using XOR?

a=a^b; b=a^b; a=a^b;


Write a c program to add 2 no without using plus operator?

You can make use of pointers to achieve this.void add( int *a, int *b){(*a) += (*b);}Now if two numbers a and b are given and you need to store the value in variable c, then you would perform:c = a;add(&c,&b);


Write a c plus plus program to find the largest among three numbers using ternary operators?

R = (A &gt; B &amp;&amp; A &gt; C) ? A : (B &gt; C) ? B : C; // parentheses not necessary - for clarity only


write simple program to solve the following problems : add the following numbers = 10,222,99,999,74,532?

A+(B+C**3) (A-(+D+B/A+B)


Write a program to chek for smllest of 3 numbers?

For .NET, assuming variables A, B, and C, and result X: X = System.Math.Min(A, (System.Math.Min(B, C));


How do write an equation for a slope?

Given two points, P = (a,b) and Q = (c,d) then provided a &acirc;&permil;&nbsp; c, slope = (d - b)/(c - a). If a = c then the slope is undefined.


How do we write c program without using swap to interchange values by accessing another variable?

int a,b; a=a+b; b=a-b; a=a-b; that's it simple