#include <stdio.h>
#include <conio.h>
main()
{
int c;
for ( c = 1 ; c <= 10 ; c++ )
printf("%d\n", c);
getch();
return 0;
}
OUTPUT:
1
2
3
4
5
6
7
8
9
10
Sample C Program To Find Area & Circumference Of A Circle.
#include <stdio.h>
#include <conio.h>
void main()
{
int r;
float pi=3.14, area, ci;
clrscr();
printf("Enter radius of circle: ");
scanf("%d",&r);
area = pi * r * r;
printf("Area of circle =%f",area);
ci = 2 * pi * r;
printf("Circumference =%f",ci);
getch();
}
OUTPUT:
Enter radius of circle: 5
Area of circle =78.500000 Circumference =31.400002
ALSO READ:
-- Program To Print First Ten(10) Natural Numbers.
-- Program To Print Fibonacci Series Upto 100.
-- Program To Check Whether A Number Is Prime Or Not.
-- Program To Compute The Reverse Of A Number.
-- Program To Print A Semicolon Without Using A Semicolon.
-- Program To Display Function Without Using The Main Function.
-- Program To Print Any Print Statement Without Using Semicolon.
-- Program To Display Its Own Source Code As Its Output.
-- Program To Swap Two Strings Using strcpy() Function.
-- Program to accept a string and print the reverse of the given string.
-- Program To Get IP Address.
-- Program To Accept An Integer & Reverse It.
-- Program To Convert Given Number Of Days To A Measure Of Time Given In Years, Weeks & Days.
-- Program To Illustrate The Concept Of Unions.
-- Program To Find The Size Of A Union.
... Back To C++ Programs Index
... Back To C++ FAQ's Index
... Back To C Programs Index
... Back To C FAQ's Index
... Back To HR Interview Index
Comments
Post a Comment
Please share your opinions and suggestions or your experience in the comments section. This way we can all help each other...
Experienced guys can share their resumes at admin@interview-made-easy.com