findddout / C

0 stars 0 forks source link

C2 #2

Open findddout opened 3 weeks ago

findddout commented 3 weeks ago

include

int main(){ printf("Hello, Wold\n"); return 0; }

findddout commented 3 weeks ago

// yuho6.cpp : Defines the entry point for the console application. //

include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[]) { int x;

scanf = ("%d", &x);
if (0 <= x && x < 100)
{
    printf("positive");
}
if (x < 0 && -100 < x);
{
    printf("negative");
}

return 0;

}

findddout commented 3 weeks ago

// yuho5.cpp : Defines the entry point for the console application. //

include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[]) { int x;

printf("please enter a number", x);
scanf("%d", &x);

if (x >= 0 && x < 59)
{
    printf("F");
}
if (x>59 && x < 69)
{
    printf("C");
}
if (x>69 && x < 79)
{
    printf("B");
}
if (x>79 && x < 89)
{
    printf("A");
}
if (x>89 && x < 99)
{
    printf("A+");
}

return 0;

}

findddout commented 3 weeks ago

// yuho6.cpp : Defines the entry point for the console application. //

include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[]) { int x;

scanf("%d", &x);
if (0 < = x)
{
    printf("positive");
}
if (x < 0 );
{
    printf("negative");
}

return 0;

}

findddout commented 3 weeks ago

// MaxMin.cpp : Defines the entry point for the console application. //

include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[]) { int x; int y; int z; int d;

printf("please enter 3 numbers\n");
scanf("%d %d %d", &x,&y,&z);
//Minimum
if (x < y && x < z)
    printf("%d is minimum", x);
else if (y < x && y < z)
    printf("%d is minimum", y);
else if (z < x && z < y)
    printf("%d is minimum", z);

//Maximum
if (x > y && x > z)
    printf("%d is maximum", x);
else if (y > x && y > z)
    printf("%d is mamximum", y);
else if (z > x && z > y)
    printf("%d is maximum", z):

return 0;

}