Answers for "Write a C program to do the following: (10 marks) a. Declare two variables a and b of type integer b. Initialise the value of variable a to 3 and the value of variable b to 0 c. If the value of a is greater than 0, then assign b the value of a + 3"

C
1

Write a C program to do the following: (10 marks) a. Declare two variables a and b of type integer b. Initialise the value of variable a to 3 and the value of variable b to 0 c. If the value of a is greater than 0, then assign b the value of a + 3

/*
 * Comment to state the purpose of this program (filename.c)
 */
#include <stdio.h>
 
int main() {
  int a=3,b=0;
  if(a>b){
  b=a+3;
  printf("%d",b);
  }
 
   return 0;
}
Posted by: Guest on October-31-2020

Code answers related to "Write a C program to do the following: (10 marks) a. Declare two variables a and b of type integer b. Initialise the value of variable a to 3 and the value of variable b to 0 c. If the value of a is greater than 0, then assign b the value of a + 3"

Code answers related to "C"

Browse Popular Code Answers by Language