Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    arrotondamento di un numero intero ad uno più piccolo...

    se io ho un numero intero... esempo 14 vorrei che vosse arrotondato a 10.
    se ho 17 vorrei avere 15
    per 23 --> 20
    per 29 --> 25

    esiste una funzione che me lo permetta?

    o devo farla io?
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  2. #2
    ho fatto una cosa del genere....
    codice:
    select case valore
    	case 0,1,2,3,4: valore = 0
    	case 5,6,7,8,9: valore = 5
    	case 10,11,12,13,14: valore = 10
    	case 15,16,17,18,19: valore = 15
    	case 20,21,22,23,24: valore = 20
    	case 25,26,27,28,29: valore = 25
    	case 30,31,32,33,34: valore = 30
    	case 35,36,37,38,39: valore = 35
    	case 40,41,42,43,44: valore = 40
    	case 45,46,47,48,49: valore = 45
    	case 50,51,52,53,54: valore = 50
    	case 55,56,57,58,59: valore = 55
    end select
    c'è un metodo più veloce (così è mostruoso... e limitato...)?
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  3. #3
    al volo

    Int(valore/5)*5

  4. #4
    belin... grazie... mi manca la mate...
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.