Computer Fundamentals Programming Lab 7
Computer Fundamentals Programming Lab 7
Computer
Fundamentals &
Programming
Lab 7
Presented By
Mohammad Anwar Hossain
Lecturer
Department of CSE
World University of Bangladesh
C Program to Swap two Numbers
// C program to swap two variables
#include <stdio.h>
// Driver code
int main()
{
int x, y;
printf("Enter Value of x ");
scanf("%d", &x);
printf("\nEnter Value of y ");
scanf("%d", &y);
// Driver code
int main()
{
char c = 'k';
int main()
{
int A;
if (A > 0)
printf("%d is positive.", A);
else if (A < 0)
printf("%d is negative.", A);
else if (A == 0)
printf("%d is zero.", A);
return 0;
}
C program to Check Whether a Number is
Positive or Negative or Zero
Thank You