[ create a new paste ] login | about

Link: http://codepad.org/hrdk5oFk    [ raw code | output | fork ]

C, pasted on Apr 15:
1
2
3
4
5
6
7
8
9
10
11
12
#include<stdio.h>
void main()
{
    int number1=10, number2=5;
    if(number2!=0)
    {
        printf("%i \n", number1/number2);
        printf("Division successful!");
    }
    else
        printf("Cannot divide by zero!");
}


Output:
1
2
2 
Division successful!


Create a new paste based on this one


Comments: