Sep 24, 2019

Generate a table in C++


Problem:
Q. Write a program that print a table of any given number by checking the condition if the given is not equal to zero then generate a table. used not operator.

Program:
#include<stdio.h>
#include<conio.h>
int main ()
logical not operator in c.
not operator in c++
{
                int a,b,i;
                printf("enter a number");
                scanf("%d",&a);
                if(!(a==0))
                {
                for(i=1;i<=10;i=i+1)
                {
                                b=a*i;
                                printf("\n%d x%d =%d",a,i,b);
                }
    }
                getch();
}


 what is not operator. see detail

0 comments:

Post a Comment

Please do not enter any spam link in the comment box