daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Dec 12th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Console.Write("Digite um numero de 4 digitos: ");
  2.     string numero = Convert.ToString(Console.ReadLine());
  3.     int soma = 0;
  4.  
  5.     for(int i = 0; i < numero.Length; i++)
  6.     {
  7.         soma += Convert.ToInt32(numero[i]);
  8.     }
  9.     Console.WriteLine("Soma dos numeros = "+soma);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand