Popular posts from this blog
HOW MAKE A TABLE IN CPP USING FOR LOOP
By lakahman malviya
lakshmankablog
// TRY KARO #include <iostream> #include<conio.h> using namespace std; int main () { long int n; cout << " you don't the table of 6836586483658 just enter your number " << endl; cin >> n; for (long int i = 1; i <= 10; ++i) { cout << n << "*" << i << "=" << n * i << endl; } cout << "Any othe kind you want to know just enter a number " << endl; cin>>n; for (long int i = 1; i <= 10; ++i) { cout << n << "*" << i << "=" << n * i << endl; } getch(); return 0; }
Check whether a character is an alphabet or not.
By lakahman malviya
lakshmankablog
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean av = false; System.out.println("Enter the Alphabet "); char ch = sc.next().charAt(0); for(int i = 'A'; i<='Z'; i++){ if(ch == i){ av = true; break; } } if(av ==false){for(int i = 'a'; i<='a'; i++){ if(ch == i){ av = true; break; } }} if(av==true){System.out.println(ch + " is an Alphabet");} else{System.out.println(ch + " is not ...
Comments
Post a Comment