Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
First Test With Coder - 3 digit number into digits
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Console.Write("please imput a number with 3 digits here:"); int x = int.Parse(Console.ReadLine()); int xhundreds1 = x / 100; int xhundreds = xhundreds1 * 100; int xdozens = ((x / 10) * 10) - xhundreds; int xdozens1 = xdozens / 10; int xdigits = ((x - xhundreds) - xdozens); Console.WriteLine("{0}and{1}and{2}",xhundreds,xdozens,xdigits); Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Project Euler Problem 8
Does string contain only digits
Quarter Hour String Generator
Swap w/o third var
sample code
count number of words in string
trees
Sum Matrix Main Diagonal
Bubble Sort
Escape's Vanity Fair (Malformed \p {X} character escape)
Please log in to post a comment.