answersLogoWhite

0


Best Answer

Use this code:

#include <iostream>

using namespace std;

int main()

{int x;

for(x=0; x<27; x++)

if(x 26) cout<< "z" << endl;

return (0);

}

User Avatar

Wiki User

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

Wiki User

13y ago

char letters[] = "abcdefghijklmnopqrstuvwxyz";

int i;

for (i = 0; i < 26; i++) printf ("%c\n", letters[i]);

/*note that you should not try to do this using bit calculations, such as 'a' + n, because that is non portable, i.e. platform / USASCII / codepage dependent and will, notably, fail on an EBCDIC implementation. */

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

int main (void)

{

puts ("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

puts ("ZYXWVUTSRQPONMLKJIHGFEDCBA");

return 0;

}

This answer is:
User Avatar

User Avatar

Anonymous

Lvl 1
3y ago

A

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in c to print characters from A to z and Z to A?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program to initialize a character and print whether it is uppercase lowercase or special character in java module 1?

I'll just write a function to do that, I hope the good people won't try to run it as it is.... void function() { char c = 'a'; if( c &gt;= 'a' &amp;&amp; c &lt;='z' ) System.out.println("LowerCase"); else if( c&gt;='A' &amp;&amp; c &lt;='Z' ) System.out.println("UpperCase"); else System.out.println("Special Character"); }


Write a program to add two 8 bit numbers in C language?

char x,y,z; x=100; y=200; z=x+y; /* overflow */ x=100; y=100; z=x+y; /* overflow if signed, okay if unsigned */ x=100; y=20; z=x+y; /* okay */


Which characters can CSS-names contain?

The CSS-names; names of selectors, classes and IDs can contain characters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, Unicode characters 161-255, as well as any Unicode character as a numeric code. The names cannot start with a dash or a digit. (Note: in HTML the value of the CLASS attribute can contain more characters).


Write a program that will add the number specified by the user?

In BASIC, this could be as simple as: 10 Input X 20 Input Y 30 Z=X+Y 40 Print X;" + ";Y;" = ";Z 50 END In JAVA... /** * A simple calculator that adds, subtracts, multiplies, and divides. * Written in Java by: AustinDoggie */ public class Calculator() { public Calculator() { // don't really have to do anything here } public int add(int x, int y) { int z = x + y; // add two numbers return z; // and return it } public int subtract(int x, int y) { int z = x - y; // subtract two number return z; // and return it } public int multiply(int x, int y) { int z = x*y; // multiply two number return z; // and return it } public int divide(int x, int y) { int z = x/y; // divide two numbers return z; // and return the result } } Hope that helps.


Write a c program the extracts and prints the rightmost digit of the integral portion of the float?

#include&lt;stdio.h&gt; int main (void) { float x,y; int z,w; printf("enter a number:"); scanf("%6.2f",&amp;x); y=x/10.0; z=x-y; w=z%10; printf("the rightmost digit is %d\n",w); return 0; }//main

Related questions

Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


Write a program to print whether the letter is vowel or not in BASIC?

vowels$ = "aeiou" CLS PRINT "PROGRAM: Find if letter is a vowel or not" PRINT INPUT "Type a single alphabet letter: (a-z)/and, then, press Enter key"; aLetter$ PRINT PRINT "Letter "; aLetter$; IF INSTR(vowels$, LCASE$(aLetter$)) THEN PRINT " is a vowel." ELSE PRINT " is NOT a vowel." END


Write a FORTRAN program using if statement to calculate the smallest of three numbers xyz?

N = x If y &lt; N then N = Y If z &lt; N then N = z Print N


Write a program using a loop to output all the letters of the alphabet in uppercase?

Here's the code for your program: # Loop through the uppercase alphabet letters for letter in range(ord('A'), ord('Z') + 1): print(chr(letter)) BTW you can use this code in Python and try it out for yourself.


Write a program to initialize a character and print whether it is uppercase lowercase or special character in java module 1?

I'll just write a function to do that, I hope the good people won't try to run it as it is.... void function() { char c = 'a'; if( c &gt;= 'a' &amp;&amp; c &lt;='z' ) System.out.println("LowerCase"); else if( c&gt;='A' &amp;&amp; c &lt;='Z' ) System.out.println("UpperCase"); else System.out.println("Special Character"); }


Write a shell script to shift all characters in a file forward by five characters?

Solution: cat test tr '[a-z A-Z]' '[f-za-e F-ZA-E]'or it can be also written as;cat test.txt | tr '[a-z A-Z]' '[f-za-e F-ZA-E]


Program to find product of three consecutive numbers?

dim x as integerdim y as integerdim z as integeron error goto Errorhandleruser input "Type first integer"x = user inputuser input "Type second integer"y = user inputuser input "Type third integer"z = user inputif z = 2+x and if y = 1+x thenprint "These numbers are consecutive!"print "Their product is" x*y*zelseif z 2+x or if y 1+x thenprint "These numbers are not consecutive."endifgoto quitErrorhandler: Print error codequitThis is about as stripped down a program as you can write. Depending on the scripting language, you will have to re-write the syntax to comply with that language's rules for syntax and commands.


What are characters in Dragon Ball Z?

Characters in Dragon ball Z are the people who are in the show


How do you write a password using only alphanumeric characters?

By using any letters A to Z and any numbers 0 to 9


Program which inputs two complex numbers and finds the sum and product of those numbers?

Try thisinput "z =?";x,yprint "z=";x;"+";y;"i"input "w =?";u,vprint "w=";u;"+";v;"i"print "z+w = ";x+u;"+";y+v;"i"print "z*w = ";x*u-y*v;"+";x*v+y*u;"i"example output:z=? 1,2w=? 2,3z+w = 3+5iz*w = -4+7iNote that it is possible to input negative imaginary parts. To display the sum and product correctly in that case, you need to make an intermediate step in the program which assigns the imaginary part to a separate variable, decide whether or not the imaginary part is negative, and then print a "+" if it is positive or no sign when it is negative (printing a negative number will automatically print the negative sign).Of course, you need to modify the program to your computer language.


Write a shell program that compares 3 numbers Print out the greatest number?

#include&lt;reg51.h&gt; #include&lt;stdio.h&gt; unsigned char x,y,z; x=5; y=2; x=8; void main() { if(x&gt;y) { if(x&gt;z) printf("x is greater %x",x); } else { if(Y=y&gt;z) printf("y is greater %x",y); else printf("z is greater %x",z); } note:finally we can see the out at UART.if u have doubt mail me


Write a program to enter the numbers till the user wants and at the end it should display the count of positive and negative and zeros entered without using array?

1 PRINT "Kindly enter your next number, Master, or 'x' to end and total them up." 2 INPUT a$: IF a$ = "x" or a$ = "X" then GOTO 10 3 K = VAL(a$) 4 If K&lt;0 then neg=neg+1: PRINT: GOTO 1 5 If K&gt;0 then pos=pos+1: PRINT: GOTO 1 6 If K=0 then Z=z+1: PRINT: GOTO 1 10 PRINT: PRINT "Thank you, Master. I cannot express the joy that this exercise has brought me. Here are your results: " 11 PRINT: PRINT "The number of positive numbers you entered was "; pos; "." 12 PRINT: PRINT "The number of negative numbers you entered was "; neg; "." 13 PRINT: PRINT "The number of zeros you entered was "; Z; "." 15 PRINT: PRINT: PRINT "Would you like to play again, Master ?" 16 PRINT "Kindly touch 'x' if no, or any other key if yes. I can hardly wait." 17 Input a$: IF a$ &lt;&gt; "X" and a$ &lt;&gt; "x" then GOTO 20 18 PRINT: PRINT "It has been my pleasure to cavort with you today, Master." 19 PRINT "Y'all come back now, y'hear !" : END 20 PRINT: CLS: PRINT "Oh GOODY! I love this game!" 21 pos=0: neg=0: Z=0 22 GOTO 1