Skip to content

Instantly share code, notes, and snippets.

@parvezmrobin
Last active February 23, 2016 12:22
Show Gist options
  • Save parvezmrobin/c6a9569a39532136178f to your computer and use it in GitHub Desktop.
Save parvezmrobin/c6a9569a39532136178f to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(){
int sir_present = 1;
if(sir_present == 1){
int a, b, c, d;
scanf("%d %d %d %d", &a, &b, &c, &d);
printf("Summation: %d \n", a+b+c+d);
printf("Multiplication: %d\n", a*b*c*d);
}
else{
printf("%d X %d = %d\n", 256, 1, 256*1);
printf("%d X %d = %d\n", 256, 2, 256*2);
printf("%d X %d = %d\n", 256, 3, 256*3);
printf("%d X %d = %d\n", 256, 4, 256*4);
printf("%d X %d = %d\n", 256, 5, 256*5);
printf("%d X %d = %d\n", 256, 6, 256*6);
printf("%d X %d = %d\n", 256, 7, 256*7);
printf("%d X %d = %d\n", 256, 8, 256*8);
printf("%d X %d = %d\n", 256, 9, 256*9);
printf("%d X %d = %d\n", 256, 10, 256*10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment