[ create a new paste ] login | about

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

C++, pasted on Sep 13:
#include<stdio.h>
#include<stdlib.h>
#include<math.h>

main () {

   
   int num; 

   printf("Insira um numero: "); 

   scanf("%d", &num); 

   if(num %2 == 0)   
                  
   { 

   printf ( " O numero %d e Par ", num); 

   }
 
   else
 
   { 

   printf ( " O numero %d e Impar ", num); 

    } 

   getch(); 

    } 


Output:
1
2
Line 5: error: ISO C++ forbids declaration of 'main' with no type
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: