Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
look at this, soaches
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static Random r = new Random(); public static void Main(string[] args){ String name = gen_name(); Console.WriteLine(name); } public static String gen_name(){ char[] nam = new char[15]; int fin = r.Next(2,12); for(int i=0; i<fin; i++){ nam[i] = rand_letter(i, nam); } String name = new String(nam); return name; } public static char rand_letter(int pos, char[] nam) { String s = "abcdefghijklmnopqrstuvwxyz"; if(pos>0){ if(nam[pos-1]=='a' || nam[pos-1]=='e' || nam[pos-1]=='i' || nam[pos-1]=='o' || nam[pos-1]=='u'){ s = "bcdfghjklmnpqrstvwxyz"; }else{ s = "aeiou"; } } return s[r.Next(0, s.Length -1)]; } } }
Show compiler warnings
[
+
]
Show input
Compilation time: 0,12 sec, absolute running time: 0,09 sec, cpu time: 0,09 sec, average memory usage: 12 Mb, average nr of threads: 2
edit mode
|
history
|
discussion
totita