How to loop A toZ?? by using 'for'.. | SoloLearn: Learn to code for FREE!

+8

How to loop A toZ?? by using 'for'..

for

1/21/2019 5:06:12 AM

Saumya Rawal

11 Answers

New Answer

+15

char i; for(i='A'; i<='Z'; i++) cout<<i<<" "; Valid for C and Java as well

+12

Hy Ashwin Rawal make sure you specify language and link your code to show your attempt & where u are facing doubt to get better help from community 👍 //in Kotlin ● ('A'..'Z').forEach(::print) ● for(i in 'A'..'Z') print(i) ● many more different ways possible.

+7

Ashwin Rawal Use printf() instead of cout then. You can do it 👍

+7

https://code.sololearn.com/cKwN4ELQWFtp/?ref=app

+4

use the encoding ansii. js example: https://code.sololearn.com/WmZHa3wPbq37/?ref=app

+2

Sorry but i need it in 'C' languege...

+2

use this code: static void Main(string[] args) { string s = "" ; for(int index=65; index<=90; index++) { s += (char)index+" "; } Console.WriteLine(s); }

+2

use this code: static void Main(string[] args) { string s = "" ; for(int index=65; index<=90; index++) { s += (char)index+" "; } Console.WriteLine(s); }

+1

Using C#: https://code.sololearn.com/c6D4MhHigwA3/?ref=app

+1

for(int i=65;i<=90;i++) System.out.println(“” + (char) i );

0

A to Z show using while loop