Program to check whether a word is in all capital letters
using System;
class a
{
public static void Main()
{
Console.WriteLine("Enter a word ");
string s=Console.ReadLine();
char []c=s.ToCharArray();
int ctr=0;
for(int i=0;i<c.Length;i++)
{
if(c[i]>=65 && c[i]<=90)
{
ctr++;
}
else
{
ctr=0;
}
}
if(ctr>0)
{
Console.WriteLine("word are in
capital letter");
}
else
{
Console.WriteLine("word are not in
all capital letter");
}
}
}
| Is This Answer Correct ? | 2 Yes | 2 No |
What are the three main types of variables?
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??
what do you mean by static member variable?
What are the components of marker interface?
tel me oops defination in single line
What is the point of polymorphism?
What are objects in oop?
What is multiple inheritance?
What is Object and Class? What are the differences between them?
What is abstraction in oop?
Can you inherit a private class?
why freind function takes more parameter than normal member function in c++?