Zgjidhja e Ushtrimeve te Leksionit 2

Nje zgjidhje e ushtrimeve te leksionit 2:

Ushtrimi 1
#include<stdio.h>
#include<conio.h>
int main(){
char emri[25],mbiemri[25],profesioni[35],email[25],nr_tel[10];
int mosha,eksperienc;
printf(“\n\n\t\t\t Curriculum Vitae \n\n”);
printf(“Emri: “);
scanf(“%s”,&emri);
printf(“Mbiemri: “);
scanf(“%s”,&mbiemri);
printf(“Mosha: “);
scanf(“%d”,&mosha);
printf(“Profesioni: “);
scanf(“%s”,&profesioni);
printf(“Eksperienca pune: “);
scanf(“%d”,&eksperienc);
printf(“Email: “);
scanf(“%s”,&email);
printf(“NrTel: “);
scanf(“%s”,&nr_tel);
getch();
return 0;
}

Ushtrimi 2

#include <conio.h>
#include <stdio.h>

int main () {
float rad ;
int grade , min , sek ;
printf(“Jepni masen e kendit ne radiane : \b”);
scanf(“%f”,&rad);
sek=rad*(648000/3.14);
min=sek/60;
sek=sek-min*60;
grade=min/60;
min=min-grade*60;
printf(“%d%s”,grade,” grade “);
printf(“%d%s”, min,” min “);
printf(“%d%s”, sek,” sek “);
getch();
return 0 ;
}

Ushtrimi 3

#include <conio.h>
#include <stdio.h>
#include <math.h>
int main () {
int h , min , s;
printf(“Jepni sasine e sekondave: \b”);
scanf(“%d”,&s);
min=s/60;
s=s-min*60;
h=min/60;
min=min-h*60;
printf(“%d%s%d%s%d%s”,h,” h “,min,” min “,s,” s “);
getch();
return 0 ;
}

Ushtrimi 4

#include<conio.h>
#include<stdio.h>
#include<math.h>
int main (){
float mesatarja , notaL, notaM, nota1, nota2, koeficenti1, koeficenti2, piket;
printf (“Jep mesataren e studentit : “);
scanf (“%f”, &mesatarja);
printf(“Jep noten e letersise”);
scanf(“%f”, &notaL );
printf(“Jep noten e matematikes”);
scanf(“%f”, &notaM );
printf(“Jep noten e lendes se pare me zgjedhje”);
scanf(“%f”, &nota1 );
printf(“Jep noten e lendes se dyte me zgjedhje”);
scanf(“%f”, &nota2 );
printf(“Jep koeficenti e lendes se pare me zgjedhje”);
scanf(“%f”, &koeficenti1 );
printf(“Jep koeficentin e lendes se dyte me zgjedhje”);
scanf(“%f”, &koeficenti2 );
piket=(0.2*(mesatarja+notaL+notaM)*1.4+0.4*(koeficenti1*nota1+koeficenti2*nota2)/2)*500;
printf (” piket e studentit jane: %f”, piket);
getch();
return 0;
}

Ushtrimi 5

#include<stdio.h>
#include<conio.h>
int main(){
int ditet,jave;
printf(“Jepni sasine e diteve “);
scanf(“%d”,&ditet);
jave=ditet/7;
printf(“%d dite perbejne %d jave.”,ditet,jave);
getch();
return 0;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: