+ 1

#include <stdio.h> int main(){ int a; printf("enter any number =") ; scanf("%d", & a) ; if (a>0) printf ("%d is positive number

Why isn't running

12th Feb 2021, 2:35 AM
Ravi Pandey
Ravi Pandey - avatar
7 odpowiedzi
+ 2
Maybe, try copying your code to the playground, saving it, and then posting a link to it in the description area of your post. Don't put the code in the question area like you currently have it and change the question to the actual question. Then maybe we can help you.
12th Feb 2021, 2:43 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Please avoid writing code in question. Rather save your code and share its link, or write the code in the Description, if the code is small (less than 10~15 lines). Here's how to share a saved code link 👇 https://www.sololearn.com/post/75089/?ref=app
12th Feb 2021, 2:44 AM
Ipang
+ 1
You dont have use %d format specifier after any number Your code should be like this: #include<stdio.h> int main(){ int a; printf("Enter any number = %d",a); scanf("%d",&a); If(a>0) { printf("%d is a positive number",a); } return 0; }
12th Feb 2021, 2:44 AM
Anurag Kumar
Anurag Kumar - avatar
+ 1
Sorry for that Ipang
12th Feb 2021, 2:58 AM
Anurag Kumar
Anurag Kumar - avatar
+ 1
🌟ᴀɴᴜʀᴀɢ🌟 No apology needed buddy ... I didn't say we don't help him, just giving him a bit of tips to help his thread gain more relevant response 👌
12th Feb 2021, 3:04 AM
Ipang
+ 1
Ipang 😊😊🌟☺️☺️☺️😃😃😌😌
12th Feb 2021, 3:10 AM
Anurag Kumar
Anurag Kumar - avatar
0
Try this 👇 #include <stdio.h> int main(){ int a; printf("enter any number : ") ; scanf("%d", & a) ; if (a>0){ printf ("It is a positive number"); } return 0; }
12th Feb 2021, 2:20 PM
Jackson Kairani Maina
Jackson Kairani Maina - avatar