[ create a new paste ] login | about

Link: http://codepad.org/fXm2YrYw    [ raw code | output | fork ]

C, pasted on Jan 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>(Заголовочный файл cstdio обеспечивает выполнение операций ввода/вывод)
#include <math.h> 
void main()
 { double x, y, r, fi; (числа с плавающей точкой)
    printf("\n X = "); 
    scanf_s("%Lf", &x); 
    printf(" Y = "); 
    scanf_s("%Lf", &y); 
    if (x) fi = atan(y / x); 
    if (x < 0 && y >= 0) fi += M_PI * 2; 
    else if (x < 0) fi += M_PI; 
    else if (!x && y > 0) fi = M_PI_2; 
    else if (!x && y < 0) fi = (3 * M_PI) / 2; 
    else if (!x && !y) fi = 0; 
    r = sqrt(x * x + y * y); 
    printf("\n r = %f\n fi = %f rad\n", r, fi); 
    _getch(); 
    return 0; 


Output:
Line 18: warning: extra tokens at end of #include directive
In function 'main':
Line 4: error: stray '\321' in program
Line 4: error: stray '\207' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\270' in program
Line 4: error: stray '\321' in program
Line 4: error: stray '\201' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\273' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\260' in program
Line 4: error: stray '\321' in program
Line 4: error: stray '\201' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\277' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\273' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\260' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\262' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\260' in program
Line 4: error: stray '\321' in program
Line 4: error: stray '\216' in program
Line 4: error: stray '\321' in program
Line 4: error: stray '\211' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\265' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\271' in program
Line 4: error: stray '\321' in program
Line 4: error: stray '\202' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\276' in program
Line 4: error: stray '\321' in program
Line 4: error: stray '\207' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\272' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\276' in program
Line 4: error: stray '\320' in program
Line 4: error: stray '\271' in program
Line 4: error: expected expression before ')' token
Line 18: warning: 'return' with a value, in function returning void
Line 18: error: expected declaration or statement at end of input
Line 4: warning: return type of 'main' is not 'int'


Create a new paste based on this one


Comments: