Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int n, i;
- scanf("%d", &n);
- float sum=0, a, b, niza[n];
- scanf("%f%f", &a, &b);
- niza[0]=a;
- niza[1]=b;
- sum=a+b;
- for(i=2;i<n;i++){
- niza[i]=sum/2;
- sum+=niza[i];
- }
- for(i=0;i<n;i++){
- printf("%.2f ",niza[i]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement