C Program examples (or) C Program Samples. This blog is arranged to improve your understanding of Turbo C programming concept. The Turbo C programming concept is also the basic concept while establishing to be a Java Programmer or C# programmer. This blog will show you in question and answer styles. After reading the question then try to write program by yourself. Then see the written program shown at this blog. You will gain more confidence and more skillful after training yourself like this.
This blog is aimed form computer science student, computer technology student and Information Technology student.
Write a program to accept two numbers, find the sum of the accepted two numbers and display the result.
Write a program to find the summation of 1 to 100 and display the result.
Write a program to find the summation of the following sequence of numbers and display the result.
2, 4, 6, 8, 10, 12, . . . , 24, 26, 28, 32
If you are interested in further reading more as shown above, in question and answer style. Please mail to the following address. Mail to the following address along with your personal information and the reason why you need this sample programs.
This blog is aimed form computer science student, computer technology student and Information Technology student.
Write a program to accept two numbers, find the sum of the accepted two numbers and display the result.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter number one ");
scanf("%d",&a);
printf("Enter number two ");
scanf("%d",&b);
c=a+b;
printf("Result is %d",c);
}
Write a program to find the summation of 1 to 100 and display the result.
#include<stdio.h>
#include<conio.h>
void main()
{
int i,c;
clrscr();
c=0;
for(i=1; i<=100;i++)
c=c+i;
printf("Result is %d",c);
}
Write a program to find the summation of the following sequence of numbers and display the result.
2, 4, 6, 8, 10, 12, . . . , 24, 26, 28, 32
#include<stdio.h>
#include<conio.h>
void main()
{
int i,c;
clrscr();
c=0;
for(i=2; i<=32;i+=2)
c=c+i;
printf("Result is %d",c);
}
If you are interested in further reading more as shown above, in question and answer style. Please mail to the following address. Mail to the following address along with your personal information and the reason why you need this sample programs.
- thswork@gmail.com