SlideShare a Scribd company logo
1 of 1
#include <stdio.h>
#include <conio.h>
#include <time.h>
int main()
{
int a=1, r=0;
clock_t start, end;
start = clock();
for(a=0;a<5000;a++)
{
r=r+2;
printf("%d ; ", r);
}
end = clock();
printf("n Start: %f - End: %f", start, end);
return 0;
}

More Related Content

What's hot (20)

Numeros primos
Numeros primosNumeros primos
Numeros primos
 
(Meta 4) ejemplo calcular la mitad de un numero dev c++
(Meta 4) ejemplo calcular la mitad de un numero dev c++ (Meta 4) ejemplo calcular la mitad de un numero dev c++
(Meta 4) ejemplo calcular la mitad de un numero dev c++
 
TUGAS BAHASA C
TUGAS BAHASA CTUGAS BAHASA C
TUGAS BAHASA C
 
C언어 스터디 강의자료 - 3차시
C언어 스터디 강의자료 - 3차시C언어 스터디 강의자료 - 3차시
C언어 스터디 강의자료 - 3차시
 
MCD
MCDMCD
MCD
 
Power%20compounding
Power%20compoundingPower%20compounding
Power%20compounding
 
Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3
 
Heep implementation in c
Heep implementation in cHeep implementation in c
Heep implementation in c
 
C언어 스터디 강의자료 - 2차시
C언어 스터디 강의자료 - 2차시C언어 스터디 강의자료 - 2차시
C언어 스터디 강의자료 - 2차시
 
C언어 스터디 강의자료 - 4차시
C언어 스터디 강의자료 - 4차시C언어 스터디 강의자료 - 4차시
C언어 스터디 강의자료 - 4차시
 
Rafael vasquez
Rafael vasquezRafael vasquez
Rafael vasquez
 
Programas for
Programas forProgramas for
Programas for
 
Cpro
CproCpro
Cpro
 
Sumas
SumasSumas
Sumas
 
B.f.s
B.f.sB.f.s
B.f.s
 
Union
UnionUnion
Union
 
Fibonacci
FibonacciFibonacci
Fibonacci
 
Fcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt ChartFcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt Chart
 
listing output program C
listing output program Clisting output program C
listing output program C
 
16067 array programs
16067 array programs16067 array programs
16067 array programs
 

Sum2

  • 1. #include <stdio.h> #include <conio.h> #include <time.h> int main() { int a=1, r=0; clock_t start, end; start = clock(); for(a=0;a<5000;a++) { r=r+2; printf("%d ; ", r); } end = clock(); printf("n Start: %f - End: %f", start, end); return 0; }