Lo siguiente es un sistema de login hecho en c++ el cual lo pueden utilizar en las aplicaciones que ustedes mismo realicen.
/* * main.cpp * * Created on: 30/06/2013 * Author: francves */#include iostream#include stdlib.husing namespace std;void login();int main(){ login(); return 0;}void login(){ string nombre; string pass; int i; for(i=1; i4; i++){ system("cls"); cout endl; cout " BIENVENIDO AL SISTEMA DE LOGIN " endl; cout "___________________________________________" endl; cout endl; cout "Por favor ingrese su informacion de usuario" endl; cout endl; cout "¿Nombre de usuario?" endl; cin nombre; if(nombre == "admin"){ cout "Nombre de usuario correcto, por favor ingrese su contrasena:" endl; cin pass; if(pass == "admin123"){ cout endl; cout "Contrasena correcta, bienvenido, sera redirigido a la aplicacion" endl; system("pausenull"); exit(0); } else if(pass != "admin123"){ cout "Contrasena incorrecta, por favor ingrese un usuario y contrasena valida" endl; system("pausenull"); } } else if(nombre != "admin"){ cout "Nombre de usuario incorrecto, por favor ingrese su nombre de usuario nuevamente" endl; system("pausenull"); } if(i 0){ cout endl; cout "Ha realizado " i "/3 intentos" endl; cout endl; system("pausenull"); } if(i == 3){ cout endl; cout "Ha realizado 3 intentos, por seguridad el programa se cerrara..." endl; system("pausenull"); exit(0); } }}
Donde están las instrucciones if y else podrán cambiar el usuario "admin" y la contraseña "admin123" por las que ustedes deseen.
if(nombre == "admin"){ cout "Nombre de usuario correcto, por favor ingrese su contrasena:" endl; cin pass; if(pass == "admin123"){ cout endl; cout "Contrasena correcta, bienvenido, sera redirigido a la aplicacion" endl; system("pausenull"); exit(0); } else if(pass != "admin123"){ cout "Contrasena incorrecta, por favor ingrese un usuario y contrasena valida" endl; system("pausenull"); } } else if(nombre != "admin"){ cout "Nombre de usuario incorrecto, por favor ingrese su nombre de usuario nuevamente" endl; system("pausenull"); }
El contador de intentos nos asegura que el usuario se puede equivocar solo 3 veces, y de hacerlo, la aplicación se cerrará exit(0).
if(i 0){ cout endl; cout "Ha realizado " i "/3 intentos" endl; cout endl; system("pausenull"); } if(i == 3){ cout endl; cout "Ha realizado 3 intentos, por seguridad el programa se cerrara..." endl; system("pausenull"); exit(0); }
Mortgage WordPress hosting home phone internet bundle asbestos mesothelioma lawsuit Donating Used Cars to Charity car insurance companies car insurance in south dakota WordPress theme designers Structures Annuity Settlement MORTGAGE ADVISER uk homeowner loans Php programmers for hire Online casino Social media strategies Donate Car to Charity California Claim CHEAP CAR INSURANCE IN VIRGINIA Asbestos Lawyers Email Bulk Service tucson car accident attorney Casino structured settlement investments caraccidentlawyer ONLINECLASSES Futuristic Architecture cash out structured settlement business email web hosting Mobile casino Hire php developers Criminal lawyer Casino reviews Make money online Australia Cheap car insurance for ladies Psd to WordPress Dwi lawyer motorcycle accident attorney chicago Live casino Php programmers PSYCHIC FOR FREE personal injury accident lawyer car accident lawyers west palm beach Hire php developer la personal injury lawyer bus accident attorney los angeles Bankruptcy lawyer Psd to html mesotheloma motor insurance quotes Insurance sell structured settlement calculator Criminal defense lawyer business administration masters DUI lawyer hughes net business PHD on Counseling Education Hire php programmers Paperport Promotional Code Better Conference Calls colorado mesothelioma lawyers DONATE CAR FOR TAX CREDIT Online College Course life insurance quotes Online Christmas cards benchmark lending new york mesothelioma law firm mesothelioma lawyer texas Low credit line credit cards ONLINE COLLEDGES Car Insurance Quotes Colorado WordPress themes for designers Holland Michigan College Social media platforms for business Service business software seattle mesothelioma lawyer Insurance Companies DONATE CARS ILLINOIS Donating a Car in Maryland low credit line credit cards Met Auto DONATE YOUR CAR FOR KIDS los angeles auto accident attorneys injury lawyers west palm beach holland michigan college WORLD TRADE CENTER FOOTAGE BETTER CONFERENCING CALLS Car Insurance Quotes MESOTHELIOMA LAW FIRM paperport promotional code DONATING USED CARS TO CHARITY CRIMINAL DEFENSE ATTORNEYS FLORIDA Neuson Proud Italian cook Computer science classes online city college in miami Html email better conferencing calls Business management software Seo companies Car Accident Lawyers annuity payment Best criminal lawyer in Arizona Low Credit Line Credit Cards Donate Old Cars to Charity alcohol rehab center in florida yahoo web hosting mesothelioma help Donate old cars to charity Best Seo company Social media examiner Best social media platforms for business Register Free Domains New social media platforms Business finance group Donate your Car for Money Car Insurance Quotes MN car insurance quotes Custom WordPress theme designer federal criminal defense attorney Seo services World Trade Center Footage Criminal Defense Attorneys Florida mesothelioma lawyer houston Best social media platforms Seo company buyer of structured settlement annuity structured settlement agreement sell your structured settlement payments Custom Christmas cards asbestos exposure lawyers injury attorney baton rouge Injury Lawyers Futuristic architecture primary pulmonary hypertension phd in counseling education How to Donate A Car in California CAR INSURANCE QUOTES PA motor replacements mesothelioma trial attorney SELL ANNUITY PAYMENT cloud identity and access management Donate your car for kids Photo Christmas cards workers compensation lawyer los angeles hosted predictive dialers what is structured settlement auto accident lawyer san francisco CHEAP DOMAIN REGISTRATION HOSTING Life insurance co Lincoln offshore accident lawyer Motor Replacements Social media management Tech school asbestos lawyers Social media platforms Christmas cards mesothelioma suit Life Insurance Co Lincoln DONATE YOUR CAR SACRAMENTO google affiliate HOME PHONE INTERNET BUNDLE Nunavut Culture Italian cooking school Adobe illustrator classes mesothelioma compensation criminal defense attorneys florida Dayton freight lines Learning adobe illustrator hair removal washington dc Social media tools Social media campaigns refinance with bad credit Dayton Freight Lines Mesothelioma Law Firm Car insurance quotes pa Donate Car for Tax Credit colorado auto accident attorney Donate Cars in MA Donate Your Car Sacramento Donate Cars Illinois mesothelioma law firm Sell Annuity Payment Online Motor Insurance Quotes HOLLAND MICHIGAN COLLEGE Donate Your Car for Kids workplace accident attorney Car Insurance Quotes PA mesothelioma settlement amounts motorcycle accident lawyer san francisco florida car insurance company Annuity Settlements structured settlements companies Donating a car in Maryland CAR INSURANCE QUOTES UTAH Hard drive Data Recovery Services Donate a Car in Maryland dallas mesothelioma lawyer Cheap Domain Registration Hosting Car Insurance Companies cell cycle regulation ppt Best Criminal Lawyers in Arizona Car Insurance Quotes Utah Cheap Car Insurance for Ladies california law lemon structured settlement buyer maritime lawyer houston Online Colleges Online Classes Massage School Dallas Texas structured settlement brokers LOW CREDIT LINE CREDIT CARDS Car Donate tennessee mesothelioma lawyer Psychic for Free mesothelioma claims Dallas Mesothelioma Attorneys ANNUITY SETTLEMENT DALLAS MESOTHELIOMA ATTORNEYS mesothelioma survival rates Cheap Auto Insurance in VA Forensics Online Course cheap car insurance in virginia Home Phone Internet Bundle mesothelioma claim Business Voip Solutions Register free domains Royalty Free Images Stock Car Insurance in South Dakota personal injury law firm Webex Costs Data Recovery Raid Cheap Car Insurance in Virginia DONATE A CAR IN MARYLAND illinois law lemon AUTOMOBILE ACCIDENT ATTORNEY cash out annuity mesotheioma MET AUTO massage school dallas texas Mortgage Adviser Virtual Data Rooms asterisk call center software Online Stock Trading Automobile Accident Attorney Donating used cars to charity Auto Accident Attorney CAR INSURANCE QUOTES COLORADO Criminal lawyer Miami Motor Insurance Quotes Personal Injury Lawyers Asbestos Lung Cancer
Lawyer Dreamhost Mortgage Auto insurance affiliate program mesothelioma claim Credit Software NUNAVUT CULTURE Claim Attomey Casino mesothelioma survival rates Classes Insurance MISSISSIPPI MESOTHELIOMA LAWYER structured settlements annuities donate old cars to charity Loans Blogs Based On Donations Rehab Mesothelioma Law Firm Donate your car for kids Attormey Recovery Donate cars in ma Transfer Donate Hosting mesothelioma attorneys california · Better Conferencing Calls Loans And Donation Treatment Laws and lawyers Trading AUTO ACCIDENT LAWYER DENVER Conference Call Technology Blogs Cord Blood Forex Trading Tourism or Travel Degree Gas/Electricity structured settlement buyer UK Canada ANNUITY SETTLEMENT All topics related to traffic from USA Donate Car to Charity California Data Recovery Services Donate Car for Tax Credit STRUCTURED ANNUITY SETTLEMENT Technology CRIMINAL DEFENSE ATTORNEY PALM BEACH DAYTON FREIGHT LINES structured settlement annuity companies Donate car to charity California · Mortgage Adviser MOTORCYCLE ACCIDENT ATTORNEY LOS ANGLES mesothelioma suit small business administration sba Nunavut culture Geographical Location of the Visitors
No hay comentarios:
Publicar un comentario