1 solutions

  • 0
    @ 2025-11-5 17:31:40

    C :

    #include <stdio.h>
    
    int main(void) {
    	int n;
    	scanf("%d", &n);
    	if(n >= 0)
    		printf("+\n");
    	else
    		printf("-\n");
    	return 0;
    }
    
    

    C++ :

    #include<cstdio>
    using namespace std;
    int main()
    {
    	int n;
    	scanf("%d",&n);
    	if(n>0)
    	{
    		printf("+\n");
    	}
    	else
    	{
    		printf("-\n");
    	}
    	return 0;
    }
    

    Pascal :

    program hfj;
      var
        a:integer;
      begin
        read(a);
        if (a>0) then write('+');
        if (a<0) then write('-');
      end.
    
    • 1

    Information

    ID
    18521
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By