20_09

Write a prolog program to calculate the sum of two numbers.

Source Code :


sum(X,Y):-

    S is X+Y,

    write(S).


Output :

 

Write a prolog program to calculate the sum of two numbers

No comments:

Post a Comment

Write a program in C to convert a decimal number to binary using recursion.

 Source code: //Write a program in C to convert a decimal number to binary using recursion. #include<stdio.h> long convertB_to_D(int d...