fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. private static string Template = "BEGIN:VCARD|VERSION:3.0|FN:{0} {1}|N:{1};{0};;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:{2}|NOTE:Polarstern Potsdam|END:VCARD";
  6.  
  7. public static void Main(string[] args)
  8. {
  9. while (true)
  10. {
  11. string name = Console.ReadLine();
  12. if (name == null)
  13. {
  14. break;
  15. }
  16. string eMail = Console.ReadLine();
  17.  
  18. string[] firstAndLastName = name.Split(' ');
  19. string firstName = firstAndLastName[0];
  20. string lastName = firstAndLastName[firstAndLastName.Length > 1 ? 1 : 0];
  21.  
  22. Console.WriteLine(Template, firstName, lastName, eMail);
  23. }
  24. }
  25. }
Success #stdin #stdout 0.02s 24140KB
stdin
Anton Gubig
tom@gubig.de
Danilo Nawior
roberto.koch@gmx.de
Issam Hawari
issi.ha@gmail.com
Johann Ertelt
claudibochow@t-online.de
Jonas Rutsch
doro.77@gmx.de
Lennart Bolle
gundabolle@gmx.de
Mia Piekarek
simijopi@gmx.de
Niklas Reinsberg
niklas@reinsberg.de
Patricia Bohnhoff
patriciabohnhoffblanco7@gmail.com
Paul Fiedler
mirko-witte@t-online.de
Philipp Beyer
beyerphilipp@yahoo.com
Tim Bedau
tim.bedau@outlook.de
Tim-Robin Pfitzner
tim.robinpf@googlemail.com
stdout
BEGIN:VCARD|VERSION:3.0|FN:Anton Gubig|N:Gubig;Anton;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:tom@gubig.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Danilo Nawior|N:Nawior;Danilo;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:roberto.koch@gmx.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Issam Hawari|N:Hawari;Issam;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:issi.ha@gmail.com|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Johann Ertelt|N:Ertelt;Johann;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:claudibochow@t-online.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Jonas Rutsch|N:Rutsch;Jonas;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:doro.77@gmx.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Lennart Bolle|N:Bolle;Lennart;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:gundabolle@gmx.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Mia Piekarek|N:Piekarek;Mia;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:simijopi@gmx.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Niklas Reinsberg|N:Reinsberg;Niklas;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:niklas@reinsberg.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Patricia Bohnhoff|N:Bohnhoff;Patricia;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:patriciabohnhoffblanco7@gmail.com|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Paul Fiedler|N:Fiedler;Paul;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:mirko-witte@t-online.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Philipp Beyer|N:Beyer;Philipp;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:beyerphilipp@yahoo.com|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Tim Bedau|N:Bedau;Tim;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:tim.bedau@outlook.de|NOTE:Polarstern Potsdam|END:VCARD
BEGIN:VCARD|VERSION:3.0|FN:Tim-Robin Pfitzner|N:Pfitzner;Tim-Robin;;;|ORG:;|EMAIL;type=INTERNET;type=HOME;type=pref:tim.robinpf@googlemail.com|NOTE:Polarstern Potsdam|END:VCARD