Monday, April 1, 2019

C Language Program for Print Check The Number is Even or Odd.


BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Check The Number is Even or Odd.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input only one numbers and that is even or odd,
then their compile will be display on screen.

The program coding is given below.
#include<stdio.h>
#include<conio.h>
void main()
{
    int n;
    clrscr();
    printf("Enter Any No= ");
    scanf("%d",&n);
    if(n%2==0)
    {
        printf("Number is Even");    
    }
    else
    {
     printf("Number is Odd");
    }
    getch();
}
Output will be given after you compile it.

Friday, March 29, 2019

C Language Program for to Find The Smallest From Two No’s.


BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Find The Smallest From Two No’s..
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input two numbers and
then their Smallest number will be calculated and
finally it will be printed on screen.

The program coding is given below.
#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b;
 clrscr();
  printf("Enter Value a&b= ");
  scanf("%d %d",&a,&b);
  if(a<b)
  {
   printf("A is Smallest");
  }
  else
  {
   printf("B is Smallest");
  }
 getch();
}
Output will be given after you compile it.

C Language Program for to Find The Largest From Two No’s.


BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Find The Largest From Two No’s..
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input two numbers and
then their Largest number will be calculated and
finally it will be printed on screen.

The program coding is given below.
#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b;
 clrscr();
  printf("Enter Value a&b= ");
  scanf("%d %d",&a,&b);
  if(a>b)
  {
  printf("A is Largest");
  }
  else
  {
  printf("B is Largest");
  }
 getch();
}
Output will be given after you compile it.

C Language Program for to Print Check The Number is Positive or Not.


BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Checking The Number is Positive or Not.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input only one numbers and that is positive or negative,
then their compile will be display on screen.

The program coding is given below.
#include <stdio.h>
#include <conio.h>
void main()
{
int n;
clrscr();
printf("\nEnter the Number=");
scanf("%d",&n);
if (n>0)
{
printf("\nNumber is Positive");
}
else
{
printf("\nNumber is Negation");
}
getch();
}
Output will be given after you compile it.

C Language Program for to Calculate Quadratic Equation.




BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Calculate Quadratic Equation .
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input only three numbers and that is equation's number,
then their Quadratic Equation will be calculated and
finally it will be printed on screen.

The program coding is given below.
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
int a,b,c;
float R1,R2;
clrscr();
printf("\nEnter a=");
scanf("%d",&a);
printf("\nEnter b=");
scanf("%d",&b);
printf("\nEnter c=");
scanf("%d",&c);
R1=((-b+sqrt(b*b-4*a*c))/2*a);
printf("\nRoot R1=%f",R1);
R2=((-b-sqrt(b*b-4*a*c))/2*a);
printf("\nRoot R2=%f",R2);
getch();
return 0;
}
Output will be given after you compile it.