0002-ADDING 2 integers , 5 and 6 no output
Exercise 1
- Write code which declares 2 integer variables A and B . Initialize A to 5 and B to 6. Use a third variable , C to store the result of A+B.
- Verify addition has occurred by using the variable watch window.
Demonstration Video
https://youtu.be/nfGwWUIZDaY
Download the files here: https://drive.google.com/file/d/15PfdndUqvnd_fLYPzctsgZMG4I9oSYtx/view?usp=sharing
Code
#include <stdio.h>
#include <stdlib.h>
int main()
{
//declare and identify variables
int a,b;
int c;
//Initialize the variables
a=5;
b=6;
//Perform processing c <-- a+b
c=a+b;
}
© 2021 Vedesh Kungebeharry. All rights reserved.