What is wrong with this code?

Started by
2 comments, last by Hoggel 13 years, 6 months ago
Hello guys n girls.
Ihave just started using C++ language and don't know what is wrong with my code.
Don't mind the printf expressions.
Thanks all!

#include "stdio.h"
#include "conio.h"

main()
{
int not;
printf("Notunuzu girin:");
scanf("%d",& not);

if(not>=45)
{
printf("Dersten Geçtiniz!");
}
else
{
printf("Dersten Kaldınız");
}
getch();
}
Advertisement
I think you need to give the main function a return type of int.
eg.

int main()
...
Thank you very much it helped and also I learnt that you can't name a variable "not" . Thanks again! :D
Also, I don't think that you can write:

#include "stdio.h"
#include "conio.h"

try

#include <stdio.h>
#include <conio.h>

instead

This topic is closed to new replies.

Advertisement