30.12.20

C PROGRAM TO PERFORM ALL LOGICAL OPERATORS AVAILABLE IN C

#include <stdio.h>

#include <stdlib.h>

 

int main()

{

int a,b,c;

printf("enter a and b values");

scanf("%d%d",&a,&b);

if(a&&b)

{

    printf("condition 1 is true ");

}

if(a||b)

{

    printf("condition 2 is true");

}

  return 0;

}

 

OUTPUT

Enter a and b values 0 10

Condition 2 is true

 


No comments:

Post a Comment

JAVA program pattern 2

import java.util.Scanner; public class pattern3 { public static void main(String args[]) { int i,j; Scanner sc=new Scanner(System.in); Syste...