Print 1 to 100 Without Using Number | Java Interview Question

preview_player
Показать описание
In this video, we are going to see the program to print 1 to 100 numbers without using any number in Java.

We are going to use the concept of ascii value and string length to solve this problem.

Java Coding Interview Question
Рекомендации по теме
Комментарии
Автор

Intelligent solution but a dumb question..what the hell is the requirement of this logic ?

santoshsarkar
Автор

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace Sololearn
{
class Program
{
static void Main(string[] args)
{
char ch ='a', ch1='b';
while(true)
{
Console.WriteLine(ch1-ch);
//ch=ch1;
ch1++;
if(ch1-ch>'d')
{
break;
}
}

}
}
}
C sharp

liontalha