Posts

C programme to reverse the number

  #include <stdio.h> int main() {     int r,k=0,n;     printf("enter the number to be reverse");     scanf("%d",&n);    while(n!=0){             r=n%10;     k=k*10+r;     n=n/10;    }    printf("%d  ",k);                               return 0; }

C programme to print Factorial of a fixed number

 #include<stdio.h> int main() {     int i=4,n=5;     while(i>=1)     {         n=n*i;         i--;      }     printf("%d",n);     return 0; }

C programme to print "C" Alphabat

 #include<stdio.h> int main() {     int i,j;     for (i=1; i<=5; i++)     {         for(j=1; j<=4;j++)         {         if(i==1 || j==1  ||i==5)         {             printf("*");            }         else         {             printf(" ");         }         }          printf("\n");     }         return 0;      }

C programme to print "B" or "8"

 #include<stdio.h> int main() {     int i,j;     for (i=1; i<=5; i++)     {         for(j=1; j<=4;j++)         {         if(i==1 || j==1 || i==3 || j==4 ||i==5)         {             printf("*");            }         else         {             printf(" ");         }         }          printf("\n");     }         return 0;      }

C programme to print English Alphabets special pattern

 a c b d e f j i h g k l m n o #include <stdio.h> int main() {     int row,col;     int num=96 ,mum;     for(row=1;row<=5;row++){         for (col=1;col<=row;col++){             if(row%2==0){                 num=num+row;                 mum=num;                 for(col=1;col<=row;col++){                     printf("%c ",mum);                     mum--;                     }                 }                 else {                     num++;             printf("%c ",n...

C programme to Print Alphabat "A"

A  #include<stdio.h> int main() {     int i,j;     for (i=1; i<=5; i++)     {         for(j=1; j<=4;j++)         {         if(i==1 || j==1 || i==3 || j==5)         {             printf("*");            }         else         {             printf(" ");         }         }          printf("\n");     }         return 0;      }

C programme to Print 1 to 25 special pattern

 1 2 3 4 5 10 9 8 7 6 11 12 13 14 15 20 19 18 17 16 21 22 23 24 25 #include <stdio.h> int main() {     int row,col,num=0,mum;     for(row=1;row<=5;row++){         for (col=1;col<=5;col++){             if(row%2==0){                 num=num+5;                 mum=num;                 for(col=1;col<=5;col++){                     printf("%d ",mum);                     mum--;                                      }}                 else {                     num++; ...

Print number from 1 to 25 in row and coloumn

  #include <stdio.h> int main() {     int row,col,z=1;     for(row=1;row<=5;row++)     {         for(col=1;col<=5;col++)     {         printf("%d",z);         z++;     }     printf("\n");     }     return 0; } output  1  2  3  4  5   6  7  8  9 10  11 12 13 14 15  16 17 18 19 20  21 22 23 24 25

C programme to Find the radius of Circle

 #include <stdio.h> #include <stdlib.h> int main() {     float R;     printf("Enter the Value of Radius: ",R);     scanf("%f",&R);     printf("The Area of the Circle is: %f", 22*R*R/7);     return 0; }

C Programme to find Area Of Rectangle

#include <stdio.h> #include <stdlib.h> int main() {       int Len, Bre;      printf("Enter the Length: ",Len);      scanf("%d/n",&Len);       printf("Enter the Breadth: ",Bre);      scanf("%d/n",&Bre);       printf("Area Of the Rectangle is: %d",Len*Bre);     return 0; }

C Programme for Accessing Array Elements

#include <stdio.h> #include <stdlib.h> int main() {     int i;     int myarray[5]={1,2,3,4,5};     for (i=0;i<5;i++)     {         printf("value of element %d is : %d\n",i,myarray[i]);     }     return 0; }

Java Programme First:- Hello World

  package com.company ; public class Main { public static void main ( String [] args) { // write your code here System . out .println( "Hello World" ); System . out .println( "My name is Jitendra" ); } }

C programming of statement coding of else if

 //statement coding of else if #include <stdio.h> #include <stdlib.h> int main() {     int i;     printf("enter the value of i: ");     scanf("%d",&i);     if(i<5)     {     printf("Hello world!\n");     }    else if(i<20)     {         printf("hello Jitendra");     }     else if(i>20)     {         printf("Ram Shayam Seeta");     }     return 0; }

C programming If else statements use

 //If else statements use #include <stdio.h> #include <stdlib.h> int main() {     int a;     printf("enter the value of a\n");     scanf("%d",&a);     if(a%2==0)         {     printf("Hello world!\n");         }     return 0; }

C program to check the number is divisible by 97 or not by if else statements.

 // To check the number is divisible by 97 or not by if else statements. #include <stdio.h> #include <stdlib.h> int main() {int n;    printf("enter the number to be divisibilty check: \n",n);    scanf("%d",&n);    if(n%97==0)    {        printf(" %d is divisible by 97",n);    }    else    {        printf("%d is not divisible by 97",n);    }     return 0; }

C program to find the Simple Interest of given Principle for give Rate of Interest for a time period:-

 // To find the Simple Interest of given Principle for give Rate of Interest for a time period:- #include<stdio.h> int main() {     int P, R, T;     float SI;     printf("enter the principle value: \n",P);     scanf("%d",&P);     printf("enter the value of rate of interest: \n",R);     scanf("%d",&R);     printf("enter the Time period: \n",T);     scanf("%d",&T);     SI=P*R*T/100;     printf("The Simple Interest:%f",SI);     return 0; }

C program to check if the number is float double or interger

 //to check if the number is float double or interger. #include<stdio.h> int main() {     int I=(3.0/8)-2;     printf("value of I is %d",I);     return 0; }