View Single Post
Old
01-27-2013, 12:14 PM
  #122
Finnish your Czech
leafs are in the pla
 
Finnish your Czech's Avatar
 
Join Date: Nov 2009
Location: Toronto
Country: Finland
Posts: 45,363
vCash: 0
Quote:
Originally Posted by ixcuincle View Post
Lirl intro to programming teaching C

When we took intro to programming we took C++
Code:
#include <stdio.h>

int main(void)

{int x;
printf("Enter the amount of goals Nazem Kadri will score this season:");
scanf("%d", &x);
if (x < 50)
{printf("Incorrect!");}
else if (x = 50)
{printf("Correct!");} 
else if (x > 50)
{printf("Incorrect!");}
return(0);}
Why is my program saying "Correct!" when I type in any number 50 or higher.

Finnish your Czech is offline   Reply With Quote