---
title: "Нақты А=(a1,a2,...,a9) векторының бірінші оң компонентінен кейінгілерін 0,5 кемітіңіз. Бастапқы мәндер: -7,4; 0; -21; 4,6; 3; -2,6; 2,5; -1,3; 0,4"
description: "import java.util.Scanner; /* * To change this license header, choose License Headers in Project Prop..."
author: "dan_ntu"
published: "2016-11-04T00:25:56+00:00"
modified: "2016-11-04T00:26:21+00:00"
locale: "kk"
canonical_url: "https://yvision.kz/kk/post/na-ty-a-a1-a2-a9-vektoryny-birinshi-o-komponentinen-keyingilerin-0-5-kemiti-iz-bastap-y-m-nder-7-4-0-723888"
markdown_url: "https://yvision.kz/kk/post/na-ty-a-a1-a2-a9-vektoryny-birinshi-o-komponentinen-keyingilerin-0-5-kemiti-iz-bastap-y-m-nder-7-4-0-723888/markdown"
site_name: "Yvision.kz"
---

# Нақты А=(a1,a2,...,a9) векторының бірінші оң компонентінен кейінгілерін 0,5 кемітіңіз. Бастапқы мәндер: -7,4; 0; -21; 4,6; 3; -2,6; 2,5; -1,3; 0,4

> import java.util.Scanner; /* * To change this license header, choose License Headers in Project Prop...

import java.util.Scanner;

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

/**

*

* @[author](http://author.yvision.kz) DMyrzaka

*/

public class Esep1 {

public static void main(String[] args){

double[] a = new double[100];

int i,k=0;

Scanner in = new Scanner(System.in);

System.out.println("Введите длину массива ->");

int n = in.nextInt();

for (i=0;i0){

k=i;

break;

}

}

System.out.println("k="+k);

for (i=k+1;i<n;i++){

a[i]-=0.5;

}

for (i=0;i<n;i++){

System.out.print("a["+i+"]="+a[i]+" ");

}

}

}

---

Source: [https://yvision.kz/kk/post/na-ty-a-a1-a2-a9-vektoryny-birinshi-o-komponentinen-keyingilerin-0-5-kemiti-iz-bastap-y-m-nder-7-4-0-723888](https://yvision.kz/kk/post/na-ty-a-a1-a2-a9-vektoryny-birinshi-o-komponentinen-keyingilerin-0-5-kemiti-iz-bastap-y-m-nder-7-4-0-723888)