Popular posts from this blog
Check character entered is a special character or not
#include<stdio.h> #include<conio.h> int main() { char ch; printf("\nEnter The Character : "); scanf("%c", &ch); if (ch >= 'A' && ch <= 'Z') { printf("Character is not Special"); } else if (ch >= 'a' && ch <= 'z') { printf("Character is not Special"); } else { printf(" Character Is Special"); } return(0); } Output:- Enter The Character : w Character is not Special Enter The Character : @ Character Is Special
Checking Entered Number .. Prime or Not
#include <stdio.h> #include<conio.h> int main () { int n , i , m = 0 , flag = 0 ; //n variable is used to store the value of entered number //varible i for loop //variable m for storing the result //variable flag for used for if statement printf ( "Enter to check the number :" ); scanf ( "%d" ,& n ); m = n / 2 ; for ( i = 2 ; i <= m ; i ++) { if ( n % i == 0 ) { printf ( "Number is not prime" ); flag = 1 ; break ; } } if ( flag == 0 ) { ...

Thank you soo much fir making our coding more easierπ
ReplyDeleteπ
ReplyDelete