www.onlinegdb.com Open in urlscan Pro
2a06:98c1:3120::3  Public Scan

Submitted URL: https://onlinegdb.com/jfETTLwtFe
Effective URL: https://www.onlinegdb.com/jfETTLwtFe
Submission: On September 19 via manual from ZA — Scanned from NL

Form analysis 13 forms found in the DOM

<form class="form-inline" role="form">
  <div class="form-group">
    <label for="settings-editor-theme">Editor Theme:</label>
    <select class="form-control" id="settings-editor-theme">
      <option value="dark">Dark</option>
      <option value="light">Light</option>
    </select>
  </div>
</form>

<form class="form-inline" role="form">
  <div class="form-group">
    <label for="settings-editor-mode">Editor Mode:</label>
    <select class="form-control" id="settings-editor-mode">
      <option value="textinput">Normal</option>
      <option value="emacs">Emacs</option>
      <option value="vim">vim</option>
    </select>
  </div>
</form>

<form class="form-inline" role="form">
  <div class="form-group">
    <label for="settings-editor-font-size">Font size:</label>
    <select class="form-control" id="settings-editor-font-size">
      <option value="small">Small</option>
      <option value="medium" selected="selected">Medium</option>
      <option value="large">Large</option>
    </select>
  </div>
</form>

<form class="form-inline" role="form">
  <div class="form-group">
    <label for="settings-editor-tab-space">Tab Space:</label>
    <select class="form-control" id="settings-editor-tab-space">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4" selected="selected">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
    </select>
  </div>
</form>

<form class="form-nline" role="form">
  <div class="form-group">
    <div class="input-group">
      <label for="setting-editor-autocomplete">Autocomplete: </label>
      <input type="radio" name="settings-editor-autocomplete" id="settings-editor-autocomplete-on" checked="">on <input type="radio" name="settings-editor-autocomplete" id="settings-editor-autocomplete-off">off
    </div>
  </div>
</form>

<form class="form-nline" role="form">
  <div class="form-group">
    <div class="input-group">
      <label for="setting-editor-wordwrap">WordWrap: </label>
      <input type="radio" name="settings-editor-wordwrap" id="settings-editor-wordwrap-on">on <input type="radio" name="settings-editor-wordwrap" id="settings-editor-wordwrap-off" checked="">off
    </div>
  </div>
</form>

<form class="form-inline" role="form">
  <div class="form-group">
    <button type="button" class="btn btn-primary" style="width:100%;" onclick="display_compiler_flags_box()">Extra Compiler Flags</button>
  </div>
</form>

<form role="form" post="#">
  <button type="button" class="btn btn-default" style="width:100%;" onclick="ide.closesettings();">Done</button>
</form>

<form>
  <div class="form-group">
    <label for="name" class="name_label">Name of Project:</label>
    <input type="text" class="form-control" id="project_name" value="">
  </div>
  <div class="form-group destination_folder" style="display:none">
    <div class="input-group">
      <span class="input-group-addon"><b>Destination Folder</b></span>
      <input type="text" class="form-control" id="project_dest_fname" value="My Projects" readonly="">
      <input type="hidden" class="form-control" id="project_dest_fid" value="">
      <span class="input-group-addon"><button type="button" onclick="changeProjectDestinationFolder()">Change</button></span>
    </div>
  </div>
  <button type="button" class="btn btn-default btn_save">Save</button>
  <span class="error_message" style="color:red"></span>
</form>

<form>
  <div class="form-group">
    <label for="name" class="name_label"></label>
    <input type="text" class="form-control" id="compiler_flags" placeholder="You can set extra compiler flags here. Leave this empty if you don't know about it." value="">
  </div>
  <button type="button" class="btn btn-default btn_save" data-dismiss="modal">Ok</button>
</form>

<form>
  <div class="form-group">
    <label for="name">Name of new file:</label>
    <input type="text" class="form-control" id="new_file_name" value="untitled">
  </div>
  <button type="button" class="btn btn-default btn-ok">ok</button>
  <span class="error_message"></span>
</form>

<form>
  <div class="form-group">
    <label for="name">Name:</label>
    <input type="text" class="form-control" id="edit_file_name" value="">
  </div>
  <button type="button" class="btn btn-default btn-ok">ok</button>
  <button type="button" class="btn btn-default" data-dismiss="modal">cancel</button>
  <span class="error_message"></span>
</form>

POST /university

<form method="post" action="/university">
  <div class="modal-body">
    <div class="form-group">
      <label for="university_name">School/University/Institute Name<span class="text-danger">*</span></label>
      <input type="text" class="form-control" name="university_name" id="university_name" placeholder="Enter university" required="">
    </div>
    <div class="form-group">
      <label for="state">State<span class="text-danger">*</span></label>
      <input type="text" class="form-control" name="state" id="state" placeholder="State" required="">
    </div>
    <div class="form-group">
      <label for="country">Country<span class="text-danger">*</span></label>
      <div class="btn-group bootstrap-select border rounded form-control h-50" style="width: 100%;"><button type="button" class="btn dropdown-toggle bs-placeholder btn-default" data-toggle="dropdown" role="button" title="Select Country"><span
            class="filter-option pull-left">Select Country</span>&nbsp;<span class="bs-caret"><span class="caret"></span></span></button>
        <div class="dropdown-menu open" role="combobox">
          <div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off" role="textbox" aria-label="Search"></div>
          <ul class="dropdown-menu inner" role="listbox" aria-expanded="false">
            <li class="hidden is-hidden selected" data-original-index="0">
              <a tabindex="0" class="" data-tokens="null" role="option" aria-disabled="false" aria-selected="true"><span class="text">Select Country</span><span class="glyphicon glyphicon-ok check-mark"></span></a></li>
          </ul>
        </div><select class="selectpicker border rounded form-control h-50" name="country" data-width="100%" data-show-subtext="true" data-live-search="true" required="" tabindex="-98">
          <option data-hidden="true" value="">Select Country</option>
        </select>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    <button type="button" class="btn btn-success" onclick="addNewUniversity()">Submit</button>
  </div>
</form>

Text Content

  ONLINEGDB BETA


ONLINE COMPILER AND DEBUGGER FOR C/C++

code. compile. run. debug. share.
 * IDE
 * My Projects
   
 * Classroom new
 * Learn Programming
 * Programming Questions
 * Sign Up
 * Login

Explore our revamped learning paths, brand new search features, & epic lineup of
upcoming coursesads via Carbon
About • FAQ • Blog • Terms of Use • Contact Us • GDB Tutorial • Credits •
Privacy

© 2016 - 2023 GDB Online

Sponsor
Frontend Masters — Explore our revamped learning paths, brand new search
features, & epic lineup of upcoming courses
×
connecting to server
Source Code    Fork this Run Language -- select -- C C++ C++ 14 C++ 17 C++ 20 C
(TurboC) C++ (TurboC) Java Python 3 Kotlin PHP C# OCaml VB HTML,JS,CSS Ruby Perl
Pascal Cobol R Fortran Haskell Assembly(GCC) Objective C SQLite
Javascript(Rhino) Prolog Swift Rust Go Bash

Editor Theme: Dark Light



Editor Mode: Normal Emacs vim



Font size: Small Medium Large



Tab Space: 1 2 3 4 5 6 7 8



Autocomplete: on off





WordWrap: on off





Extra Compiler Flags

Done
 * main.cpp
 * 0
   Rename Delete

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*Task 1: Vigenere Cipher
To write a console program supporting encryption and decryption of messages of
arbitrary size using the Visionary Cipher. The program should support the
following set of commands:
• encrypt <<KEY>> <<MESSAGE>> – with the key <<KEY>> the program should encrypt
the message <<MESSAGE>>, outputting the resulting ciphertext <<CIPHERTEXT>> to
the standard output
• decrypt <<KEY>> <<MESSAGE>> – with the <<KEY>> key, the program should decrypt
the <<CIPHERTEXT>> message, outputting the resulting original message
<<MESSAGE>> to the standard output
Explanations:
 Message <<MESSAGE>> is defined as a string representing a sequence of
uppercase Latin letters (from A to Z inclusive) of arbitrary size.
 Key <<KEY>> is defined as a string representing a sequence of uppercase Latin
letters (from A to Z inclusive) of arbitrary size.
 A keyword <<KEYWORD>> is obtained by concatenating the letters of the key
<<KEY>> as many times as necessary to obtain the length of the message
<<MESSAGE>>. Example:
<<MESSAGE>> = ATTACK AT DAWN
<<KEY>> = APPLE
<<KEYWORD>> = APPLEAPPLEAP
• To be able to understand the Vigenere cipher, we must first assume that each
capital letter from A to Z corresponds to a number from 0 to 25. In this sense,
A -> 0, B -> 1, C -> 2, D -> 3… G -> 6.. Z -> 25. Under this condition we can
have an expression of the type C + D = F because this equivalent to 2 + 3 = 5.
With this in mind, a Vigener Cipher is replacing each letter in the string with
another by taking the numerical value of the letter in the string and adding
the numeric value of the corresponding letter of the <<KEYWORD>> keyword,
similar to the example expression above. That is, the newly obtained letter
corresponds to the sum of the numerical values of the letter of the string and
the letter of the keyword.
◦ Example:
▪ Let <<MESSAGE>> =ATTACK AT DAWN and <<KEY>> = APPLE.
▪ Then the letters in <<MESSAGE>> can be encrypted by offsetting each of them
with their corresponding letter in the key
<<KEY>> as follows:
<<MESSAGE>> = ATTACK AT DAWN
<<KEY>> = APPLE
<<KEYWORD>> APPLEAPPLEAP
Offset by: 0,15,15,11,4,0 15,15 11,4,0,15
<< CIPHERTEXT >> = AIILGK PI OEWC
Sample input for encrypt:
• encrypt APPLE ATTACK AT DAWN
Output:
• AIILGK PI OEWC
Example input for decrypt:
• decrypt APPLE AIILGK PI OEWC
Output:
• ATTACK AT DAWN*/

#include <iostream>
#include <cstring>
using namespace std;

int len(char* str) {

int i = 0;

while (str[i] != '\0') {

i++;
}

return i;
}

bool capitalsLettersOnly(char* str, int index) {

if (str[index] != '\0') {

if (str[index] >= 'A' && str[index] <= 'Z') {



 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


COMPILING PROGRAM...

 * input
 * stdout
 * stderr
 * Debug Console

Command line arguments:

Standard Input: Interactive Console Text


×






PROGRAM IS NOT BEING DEBUGGED. CLICK "DEBUG" BUTTON TO START PROGRAM IN DEBUG
MODE.

start pause continue step over step into step out help



CALL STACK

#FunctionFile:Line

LOCAL VARIABLES

VariableValue

REGISTERS

RegisterValue

DISPLAY EXPRESSIONS

ExpressionValue

BREAKPOINTS AND WATCHPOINTS

#Description


×

POSSIBLE REASONS FOR RUNTIME EXCEED ERROR

 1. If your program is reading input from standard input and you forgot to
    provide input via stdin.
 2. Your program contains infinite loop, which may never break.
 3. Your program contains infinite recursive function calls.
 4. May be your program is trying to process large data and it takes much time
    to process

ok
×




Ok
×

NEW VERSION AVAILABLE

New Version of OnlineGDB is available. Please save your data and refresh page to
update.

Ok
×

RUNNING TURBO C PROJECT


×

SAVE PROJECT

Name of Project:
Destination Folder Change
Save
×

EXTRA COMPILER FLAGS


Ok
×

ARE YOU SURE YOU WANT TO DELETE FILE ``?

Yes No
×



Yes No
×

NEW FILE

Name of new file:
ok
×

RENAME FILE

Name:
ok cancel
×

SHARE LINK

source code is copied to below link.



×

LOST CONNECTION TO SERVER

Oops! Connection to server is lost. Please refresh the page to reconnect.

ok
×

DEBUG SESSION STOPPED

Debug session is being stopped due to inactivity.

ok
×

DEBUG MODE FOR PYTHON PROGRAM IS NOT YET SUPPORTED.

ok
×

LOGIN TO YOUR ACCOUNT


LOGIN WITH
GOOGLE+
FACEBOOK
GITHUB

×

RUN CONSOLE SESSION STOPPED

Run Console is being stopped due to inactivity.

ok
×

ADD SCHOOL/UNIVERSITY/INSTITUTE

School/University/Institute Name*
State*
Country*
Select Country 
 * Select Country

Select Country
Close Submit
×

KEYBOARD SHORTCUTS

IDE Shortcuts:
New file : Ctrl-M
Run Code : F9
Debug Code : F8
Save Project : Ctrl-S
Beautify Code : Ctrl-B
Settings Menu : Ctrl-Shift-S
Info : Ctrl-I

Editor Shortcuts:
showSettingsMenu : Ctrl-,
goToNextError : Alt-E
goToPreviousError : Alt-Shift-E
selectall : Ctrl-A
gotoline : Ctrl-L
fold : Alt-L|Ctrl-F1
unfold : Alt-Shift-L|Ctrl-Shift-F1
toggleFoldWidget : F2
toggleParentFoldWidget : Alt-F2
foldOther : Alt-0
unfoldall : Alt-Shift-0
findnext : Ctrl-K
findprevious : Ctrl-Shift-K
selectOrFindNext : Alt-K
selectOrFindPrevious : Alt-Shift-K
find : Ctrl-F
overwrite : Insert
selecttostart : Ctrl-Shift-Home
gotostart : Ctrl-Home
selectup : Shift-Up
golineup : Up
selecttoend : Ctrl-Shift-End
gotoend : Ctrl-End
selectdown : Shift-Down
golinedown : Down
selectwordleft : Ctrl-Shift-Left
gotowordleft : Ctrl-Left
selecttolinestart : Alt-Shift-Left
gotolinestart : Alt-Left|Home
selectleft : Shift-Left
gotoleft : Left
selectwordright : Ctrl-Shift-Right
gotowordright : Ctrl-Right
selecttolineend : Alt-Shift-Right
gotolineend : Alt-Right|End
selectright : Shift-Right
gotoright : Right
selectpagedown : Shift-Pagedown
gotopagedown : Pagedown
selectpageup : Shift-Pageup
gotopageup : Pageup
scrollup : Ctrl-Up
scrolldown : Ctrl-Down
selectlinestart : Shift-Home
selectlineend : Shift-End
togglerecording : Ctrl-Alt-E
replaymacro : Ctrl-Shift-E
jumptomatching : Ctrl-P
selecttomatching : Ctrl-Shift-P
expandToMatching : Ctrl-Shift-M
removeline : Ctrl-D
duplicateSelection : Ctrl-Shift-D
sortlines : Ctrl-Alt-S
togglecomment : Ctrl-/
toggleBlockComment : Ctrl-Shift-/
modifyNumberUp : Ctrl-Shift-Up
modifyNumberDown : Ctrl-Shift-Down
replace : Ctrl-H
undo : Ctrl-Z
redo : Ctrl-Shift-Z|Ctrl-Y
copylinesup : Alt-Shift-Up
movelinesup : Alt-Up
copylinesdown : Alt-Shift-Down
movelinesdown : Alt-Down
del : Delete
backspace : Shift-Backspace|Backspace
cut_or_delete : Shift-Delete
removetolinestart : Alt-Backspace
removetolineend : Alt-Delete
removewordleft : Ctrl-Backspace
removewordright : Ctrl-Delete
outdent : Shift-Tab
indent : Tab
blockoutdent : Ctrl-[
blockindent : Ctrl-]
transposeletters : Ctrl-T
touppercase : Ctrl-U
tolowercase : Ctrl-Shift-U
expandtoline : Ctrl-Shift-L
addCursorAbove : Ctrl-Alt-Up
addCursorBelow : Ctrl-Alt-Down
addCursorAboveSkipCurrent : Ctrl-Alt-Shift-Up
addCursorBelowSkipCurrent : Ctrl-Alt-Shift-Down
selectMoreBefore : Ctrl-Alt-Left
selectMoreAfter : Ctrl-Alt-Right
selectNextBefore : Ctrl-Alt-Shift-Left
selectNextAfter : Ctrl-Alt-Shift-Right
splitIntoLines : Ctrl-Alt-L
alignCursors : Ctrl-Alt-A
findAll : Ctrl-Alt-K
showKeyboardShortcuts : Ctrl-Alt-H
          

Close