answersLogoWhite

0

TO PRINT ALPHABET PYRAMID

ABCDEFGGFEDCBA

ABCDEFFEDCBA

ABCDEEDCBA

ABCDDCBA

ABCCBA

ABAB

A

#include

#incldue

int main( )

{

int r,c,askey,sp;

clrscr( );

for( r=7; r>=1; r-- )

{

for(sp=6; sp>=r; sp--)

printf(" "); //2 spaces

askey=65;

for(c=1; c<=r; c++ )

printf("%2c", askey++ );

for(c=r-1; c>=1; c-- )

printf("%2c", --askey);

printf("\n");

}

getch();

return 0;

}

by BRAMHA VARDHAN

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Write a java program to check a number is Armstrong number?

import java.io.*; public class Jerry { public static void main(String as[]) throws IOException { int k=Integer.parseInt(as[0]); int n=k; int d=0,s=0; while(n&gt;0) { d=n%10; s=s+(d*d*d); n=n/10; } if(k==s) System.out.println("Armstrong number"); else System.out.println("not Armstrong number"); } }


Write a program to illustrate the usage of pointers with arrarys and functions?

* * * * * * * * * * write the c++ program and show me brifily?


How do you write a program in C using the fprint and fscan functions?

By using those two functions in your code.


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


How do you write c program to perform sum of elements of matrix using pointers with functions?

i cant write


How do you write a Java program to see whether a number is Armstrong or not... using Buffered Reader and stuff ....?

import java.io.*; class Armstrong { public static void main()throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a number"); int a=Integer.parseInt(in.readLine()); int n1=a,rev=0,d=0; while(a!=0) { d=a%10; rev=rev+d*d*d; a=a/10; } if(rev==n1) System.out.println("It is a armstrong number "); else System.out.println("It is not a armstrong number "); } }


How many essential functions are required to write a c program and write those?

One.int main (void) { return 0; }


What is the importance of functions in a c plus plus program?

Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.


Write a program to find Armstrong number in visual basic 10?

An Armstrong number (or narcissistic number) for a given number of digits is a number that is equal to the sum of its own digits raised to the power of the number of digits. Here’s a simple Visual Basic 10 program that checks for Armstrong numbers: Module ArmstrongNumber Sub Main() Dim num As Integer Dim sum As Integer = 0 Console.Write(&quot;Enter a number: &quot;) num = Convert.ToInt32(Console.ReadLine()) Dim temp As Integer = num Dim digits As Integer = num.ToString().Length While temp &gt; 0 Dim digit As Integer = temp Mod 10 sum += Math.Pow(digit, digits) temp \= 10 End While If sum = num Then Console.WriteLine(num &amp; &quot; is an Armstrong number.&quot;) Else Console.WriteLine(num &amp; &quot; is not an Armstrong number.&quot;) End If End Sub End Module This program takes a number as input, calculates the sum of its digits raised to the power of the number of digits, and checks if the sum equals the original number.


Write C program using functions to simulate a Calculator with the basic functions - square root and reciprocal?

trytytytytytytytytrf 6 bcvvtgujhy6


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


How do you write a java program for finding multiligual languages?

You can use Java's built-in functions to write a code that will find multilingual languages.