Cannot read a random integer from another script.

Hey, I’ve been fiddling with Unity for a while know, learning to code myself through a lot of tutorials and pasting/re-writing/modyfing them to my needs. I decided its time to make something small but without help of any “outside” code, just from the docs and mind.
And it made me stuck on this particular problem, i cannot read random generated integers from another script, they keep popping as 0 (zero) all the time, if you could tell me where I made my mistake I would be greatful, as for now, i’ve been searching for the answear on the forums+google but nothings seems to fix it, its eaither compilation error or the same outcome as it is now, I even re-wrote this thing using different methods. Here is what i’ve got:

The first random number generator, that also pops the number into UI text box

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class RandomNumberA : MonoBehaviour {

	public int a;
	Text numA;

	void Awake ()
	{
		numA = GetComponent <Text> ();


	}
	void Start () {
	
		int a = Random.Range(1,255);
		numA.text = "" +a;
	}
	
	void Update () {
	
	
	}
}

There is another one that looks the same, but with int B, but then there is one script that should add both and make it a C

using UnityEngine;
using UnityEngine.UI;
using System.Collections;
//using RandomNumberA;
//using RandomNumberB;

public class Add : MonoBehaviour {
	
	private int anum;
	private int bnum; 
	public int c;
	Text addnum;

	void Awake ()
	{
		addnum = GetComponent <Text>();
	}
	// Use this for initialization
	void Start () 
	{
		anum = GameObject.Find("VarA").GetComponent<RandomNumberA>().a;
		print ("A" +anum);
		bnum = GameObject.Find("VarB").GetComponent<RandomNumberB>().b;
		print ("B" +bnum);
		c = anum + bnum;
		print(c);

	}

	// Update is called once per frame
	void Update () 
	{
}

}

int a is on game object in canvas called VarA the b is on the same Canvas called VarB

Console pops me with this:

A0
UnityEngine.MonoBehaviour:print(Object)
Add:Start() (at Assets/Add.cs:22)

B0
UnityEngine.MonoBehaviour:print(Object)
Add:Start() (at Assets/Add.cs:24)

0
UnityEngine.MonoBehaviour:print(Object)
Add:Start() (at Assets/Add.cs:26)

The problem is that you are re-declaring the variable a, and I assume b in your Start() method. When you type int a = Random.Range(1,255) again it creates a new variable a that is local only to the start method and does not change your class member a. So instead just assign a random number to the a that you already created.

     public int a;
 
     void Start () {
     
         a = Random.Range(1,255);
         numA.text = "" +a;
     }