SAY THE ERROR IN THIS PROGRAM | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

SAY THE ERROR IN THIS PROGRAM

#include <stdio.h> int main() { int score; int ticket; int gunprice; ticket = score / 12; if(gunprice < ticket) printf("Buy it"); else printf("try again"); return 0; }

3rd May 2021, 5:04 PM
RAHUL K
2 Answers
+ 4
RAHUL K by the it is not a error, it is a warning Because u didn't give a value to score and gunprice variables so they are uninitialised and giving a warning.... Simply give them some value and ur error gives
3rd May 2021, 5:10 PM
Abhay
Abhay - avatar
0
RAHUL K Just give values to "score" and "gunprice" or take as input from user !
4th May 2021, 12:13 AM
Giriraj Yalpalwar
Giriraj Yalpalwar - avatar