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.

Sunday, March 24, 2019

Write a Program For Calculate Area and Circumference of Circle



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



Here you will get simple C program 
C Language Program for Calculate Area and Circumference of Circle.
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 radius,
then their Area Circumference 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 r;
 float Area,Circum;
 clrscr();
 printf("Enter Radius=");
 scanf("%d",&r);
 Area=3.14*r*r;
 printf("Area of Cricle=%f\n",Area);
 Circum=2*3.14*r;
 printf("Circumference of Cricle=%f\n",Circum);
 getch();
}
Output will be given after you compile it.

Saturday, March 23, 2019

WRITE A PROGRAM FOR SIMPLE INTEREST


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


Here you will get simple C program 
C Language Program for Simple Interest.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input three different numbers,
then their Simple Interest 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 p,r,n,si;
    clrscr();
    printf("Enter Principle, Rate of Interest, Number's of Year are = ");
    scanf("%d %d %d",&p,&r,&n);
    si=(p*r*n)/100;
    printf("Simple Interest is = %d",si);
    getch();    
}
Output will be given after you compile it.

WRITE A PROGRAM FOR SWAPPING FOR TWO VALUES


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

Here you will get simple C program 
WRITE A PROGRAM FOR SWAPPING FOR TWO VALUES
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,
then their SWAPPING 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,t;
clrscr();
printf("Enter Two Value's = ");
scanf("%d %d",&a,&b);
t=a;
a=b;
b=t;
printf("After Swapping is = %d %d",a,b);
getch();
}
Output will be given after you compile it.

WRITE A PROGRAM FOR MULTIPLICATION AND DIVISION FOR TWO VALUES


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

Here you will get simple C program 
WRITE A PROGRAM FOR MULTIPLICATION AND DIVISION FOR TWO VALUES
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,
then their multiplication and division 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,c;
 clrscr();
 printf("Enter a= ");
 scanf("%d",&a);
 printf("Enter b= ");
 scanf("%d",&b);
 c=a*b;
 printf("\nMulti=%d",c);
  c=a/b;
  printf("\nDiv=%d",c);
 getch();
}
Output will be given after you compile it.