Skip to content

Instantly share code, notes, and snippets.

@EdSkamor
Created September 14, 2017 08:33
Show Gist options
  • Select an option

  • Save EdSkamor/52924767b2482cc85cd4d97766b369d7 to your computer and use it in GitHub Desktop.

Select an option

Save EdSkamor/52924767b2482cc85cd4d97766b369d7 to your computer and use it in GitHub Desktop.
devision
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AllNumbersFrom0To1000Equas3 : MonoBehaviour {
public int Suma = 0;
public int iloscPodzielnych;
// Use this for initialization
void Start() {
/* for (int Numbers = 0; Numbers <= 1000; Numbers++) {
if ((Numbers % 3) == 0)
{
Suma++;
}
}
Debug.Log(Suma); */
int y=0;
while (y%3 == 0 || y == 1000){
iloscPodzielnych++;
y++;
}
print(iloscPodzielnych);
}
// Update is called once per frame
void Update () {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment