skip to main (ir a principal)
|
skip to sidebar (ir al sidebar)
C Programs
Twitter
Facebook
Flickr
RSS
Pages
Home
SUM OF ALL VALUES FROM 1 - 5
Siraj Shaikh
#include<stdio.h>
#include<conio.h>
void main()
{
int i,s=0;
i=1;
while(i<=5)
{
s=s+i;
i++;
}
printf("Sum=%d",s);
getch();
}
0 comments:
(
+add yours?
)
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Archive
Archive
Jun 01 (4)
May 01 (1)
Apr 28 (5)
Apr 13 (4)
Apr 03 (4)
Mar 07 (5)
Mar 05 (5)
Mar 04 (4)
Feb 25 (2)
Feb 24 (7)
Feb 23 (5)
Feb 22 (2)
Feb 21 (8)
Feb 20 (10)
Popular Posts
TO FIND MAXIMUM & MINIMUM OF THREE NUMBERS
#include<stdio.h> void main() { int a,b,c; printf("Enter 3 numbers"); scanf("%d%d%d",&a,&b,&c...
ORIGINAL & REVERSE
#include<stdio.h> #include<conio.h> void main() { int no,r,a,b,c,d,o; clrscr(); printf("ENTER A 5 DIGIT NUMBER"); sca...
MULTIPLICATION OF ALL VALUES 1 - 5
#include<stdio.h> #include<conio.h> void main() { int i,s=1; i=1; while(i<=5) { s=s*i; i++; } printf(&quo...
TO CALCULATE THE SUM OF FIRST N EVEN NUMBERS
#include<stdio.h> void main() { int n, sum, i; printf("Enter value of n"); scanf("%d",&n); for(i = ...
TO ACCEPT BASIC SALARY FROM THE USER. IF BASIC SALARY>=5000 THEN HRA=15% % DA=150% OF BASIC SALARY.IF BASIC SALARY < 5000 THEN HRA=10% & DA=110% OF BASIC SALARY. DISPLAY GROSS SALARY
#include<stdio.h> void main() { float basic, hra, da; printf("Enter basic salary"); scanf("%f",&a...
TO CALCULATE x(y+z) BY USING USER DEFINED FUNCTION
#include<stdio.h> void power(int x,int y, int z) { int ans = 1, i; for(i = 1; i <= (y+z); i++) ans *= x; printf("%...
CALCULATE SUM OF FIBONACCI SERIES UP TO A GIVEN TERMS
#include<stdio.h> #include<conio.h> void main() { int num1=0, num2=1, num3, n, term; printf("Enter number terms to ...
TO ACCEPT N NUMBERS AND DISPLAY SUM OF ALL POSITIVE & NEGATIVE NUMBERS
#include<stdio.h> void main() { int n, pSum = 0, nSum = 0, num; printf("Enter how many numbers you want print"); sc...
MULTIPLICATION OF 2 M X N MATRICES
#include<stdio.h> #include<conio.h> void main() { long int a[50][50],b[50][50],c[50][50]; int i,j,k,r1,c1,r2,c2; ...
INTRODUCTION OF 'C'
'C' PROGRAMMING IS DEVELOPED IN 1972 BY DENNIS RITCHIE AT "AT & T BELL'S LAB USA". C PROGRAMMING IS A HIGH LEVE...
Followers
Programs
Web Toolbar by Wibiya
Its Me
Siraj Shaikh
View my complete profile
No of Views
0 comments: (+add yours?)
Post a Comment