count the sides or edges.
if (n>0) printf ("%d is positive\n", n);
160 and 192.
#include <stdio.h> int main() { printf("Program to find ODD or Even Number\n"); while(1) { int n = 0; printf("\nEnter a number(-1 for Exit): "); scanf("%d",&n); if( n 0) { printf("%d is a EVEN number.\n", n); } else { printf("%d is a ODD number.\n", n); } } return 0; }
printf(\n "ENTER THE NUMBER\t"); scanf{"%d",&a); while(a!=0); { r=a%2; if(r==0) printf("\n\n THE NUMBER IS EVEN \t"); else printf("\n\n THE NUMBER IS ODD \t"); printf ("\n ENTER THE NUMBER \t"); scanf("%d",&a); } getch(); }
#include#includevoid main(){long int n;printf("Please enter the number");scanf("%ld" ,&n);n=n*n;printf("Square of entered number = %ld ");}but if you want to show the entered number e.g.Square of the entered number 8=64then below is the code.#include#includevoid main(){long int m,n;printf("Please enter the number");scanf("%ld" ,&n);m=n;n=n*n;printf("Square of entered number %ld = %ld ",m,n);}
(n-2) x 180 n being the number of sides that the shape has
n(n - 3)/2. where n is the number of sides in the shape
The easiest way to find out how many degrees in any shape is 180*(n-2) where n equals the number of angles in the shape. Thus, triangles have 180 degrees.
Use a protractor or use the formula: (n-2)*180 = sum of degrees whereas 'n' is the number of sides of the shape or polygon
S is the length of any sideN is the number of sidesS^2N-------------4 tan(pi/N)
A prism with an n-sided base will have 2n vertices, n + 2 faces, and 3n edges. A pyramid with an n-sided base will have n + 1 vertices, n + 1 faces, and 2n edges.
A regular polygon of n sides (where n > 4) has n obtuse angles. Since there is no limit to the number of sides that a polygon can have, there can be no limit to the number of obtuse angles in a shape.
To determine the degrees of a shape, first identify the type of shape and count the number of sides it has. For polygons, the formula to calculate the sum of the interior angles is (n - 2) × 180°, where n is the number of sides. To find each interior angle of a regular polygon, divide the total sum by the number of sides. For irregular shapes, you may need to break them into triangles or use other methods to find individual angles.
To find the number of sides ( n ) of a polygon using its interior angle ( A ), you can use the formula for the interior angle of a regular polygon: ( A = \frac{(n-2) \times 180}{n} ). Rearranging this equation, you get ( n = \frac{360}{180 - A} ). By substituting the known value of the interior angle ( A ), you can calculate the number of sides ( n ) of the polygon.
The formula to find the total amount of degrees contained by a shape is (n-2) * 180, where n is the number of sides. So, 25 - 2= 23, and this times (*) 180 is 4140, so the total of the internal angles of a 25-sided shape is 4140.
To find the number of diagonals in a polygon with ( n ) sides, you can use the formula: (\frac{n(n-3)}{2}). For a 152-sided shape, the calculation would be (\frac{152(152-3)}{2} = \frac{152 \times 149}{2} = 11376). Therefore, a 152-sided shape has 11,376 diagonals.
To create a flowchart for finding the sum of ( n ) positive numbers, start with a "Start" shape. Next, use a "Process" shape to initialize a sum variable to 0 and a counter to 1. Then, add a "Input" shape to read the first number, followed by a "Decision" shape to check if the counter is less than or equal to ( n ). If true, add the input number to the sum, increment the counter, and loop back to the input step; if false, proceed to a "Process" shape to output the sum and end the flowchart with an "End" shape.