Profile cover photo
Profile photo
Manjeet Singh Kuthar
58 followers
58 followers
About
Posts

Post has attachment

Post has attachment
C Program to Check Whether a Number is Prime or Not.
#include <stdio.h> int main() {     int n, i, flag = 0;     printf("Enter a positive integer: ");     scanf("%d",&n);     for(i=2; i<=n/2; ++i)     {         // condition for nonprime number         if(n%i==0)         {             flag=1;             break...
Add a comment...

Post has attachment

Post has attachment
C Program to Display Prime Numbers Between Two Intervals.
#include <stdio.h> int main() {     int low, high, i, flag;     printf("Enter two numbers(intervals): ");     scanf("%d %d", &low, &high);     printf("Prime numbers between %d and %d are: ", low, high);     while (low < high)     {         flag = 0;        ...
Add a comment...

Post has attachment

Post has attachment
C Program to Display its own Source Code as Output.
#include <stdio.h> int main() {     FILE *fp;     char c;     fp = fopen(__FILE__,"r");     do {          c = getc(fp);          putchar(c);     }     while(c != EOF);     fclose(fp);     return 0; }
Add a comment...

Post has attachment

Post has attachment
Program to Display English Alphabets in Uppercase and Lowercase.
#include <stdio.h> int main() {     char c;     printf("Enter u to display alphabets in uppercase. And enter l to display alphabets in lowercase: ");     scanf("%c", &c);     if(c== 'U' || c== 'u')     {        for(c = 'A'; c <= 'Z'; ++c)          printf("%...
Add a comment...

Post has attachment

Post has attachment
C Program to Display Characters from A to Z Using Loop.
#include <stdio.h> int main() {     char c;     for(c = 'A'; c <= 'Z'; ++c)        printf("%c ", c);         return 0; } Output:- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Add a comment...
Wait while more posts are being loaded