Posts

Showing posts from November, 2021

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; }