C/C++ :: Encrypting Password To Be Inputed And Printing It As Asterisk Format

Sep 14, 2014

#include<stdio.h>
#include<conio.h>
#include<string.h>
char str1[20], str2[20]="kent";
main() {
printf("Enter your Username: ");
scanf("%s",str1);

[Code] ...

View 1 Replies


ADVERTISEMENT

C++ :: How To Change Password Input To Asterisk

Mar 6, 2015

Code:
#include <iostream>
#include <string>
using namespace std;

int main()

[Code] ....

View 6 Replies View Related

C++ :: How To Produce Password Field With Asterisk

Sep 2, 2014

void Log_In() {
system("cls");
gotoxy(30, 30);
time_t now;
time(&now);

[Code] .....

How to produce a password field with asterisk ****** .....

View 1 Replies View Related

C++ :: Asterisk Diamond Is Printing Out Wrong

Sep 6, 2014

I feel as if I'm so close and I'm just messing up a value somewhere, but I am at a loss as to what I should change. Here is my code:

#include "stdafx.h"
#include <iomanip>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[]) {

[Code] ....

View 2 Replies View Related

C/C++ :: Printing Asterisk Along A Function Of Y Columns

Jun 18, 2014

The assignment is to plot the functions, by implementing a function having the following prototype:

void plotPoint(double y);

This function should print a single "*" symbol, in a position determined by the value of y, and then a newline. The position of the * symbol can span over 80 columns: each column should represent a delta of length 0.1 in the value of y, and the zero should be placed on the 40-th column.

For example:
• placePoint(0) should print the * symbol on the 40th column
• placePoint(0.1) should print the * symbol on the 41st column
• placePoint(1) should print the * symbol on the 50th column
• placePoint(-1) should print the * symbol on the 30th column

Here is what I have so far:

#include <iostream>
#include <cmath>
int a;
int b;
int x;
int y;
int Func1(double a, double b )/>

[Code] ....

I'm lost now as to where to go to plot. I know that depending on the option chosen I call the corresponding function to return a value for y which is just then plugged into a function to plot it on columns of y.

View 6 Replies View Related

C :: Printing Of A File In Different Format?

Sep 13, 2013

The requirement is to capture statistics of uuid occurrences for ALIVE/SEARCH/BYEBYE (it can be all 3, combinations of 2 each, or one alone) in a dynamically populated file in run time.

I am able to print all 3 combinations, but not in combination of 1 or 2 e.g.

If my input.txt is like this :

uuid:22314754-a597-490b-8a93-02cfae01036b ALIVE 16
uuid:22314754-a597-490b-8a93-02cfae01036b BYEBYE 8
uuid:22314754-a597-490b-8a93-02cfae01036b SEARCH 8
uuid:50e65653-7525-485d-83bf-d293558c4264 ALIVE 32
uuid:50e65653-7525-485d-83bf-d293558c4264 BYEBYE 8
uuid:50e65653-7525-485d-83bf-d293558c4264 SEARCH 132

[Code]...

Code:

#include<stdio.h>
#include<string.h>
struct uid
{
char uid_val[100];
char state[100];
int temp_count;
int alive_count;
int search_count;

[Code]...

Gives the following output ->output.txt)

Device ID ALIVE BYEBYE SEARCH
uuid:22314754-a597-490b-8a93-02cfae01036b 16 8 8
uuid:50e65653-7525-485d-83bf-d293558c4264 32 8 132
uuid:55076f6e-6b79-4d65-6497-180373763bc1 113 112 111
uuid:T0100203354 1 2 3

I want to generalize the code such that uuid occurrence does not have to be all 3 (ALIVE/SEARCH/BYEBYE), the occurrences can be any combination and code should work. e.g my code gives wrong results when input.txt contains the following:

uuid:22314754-a597-490b-8a93-02cfae01036b BYEBYE 8
uuid:22314754-a597-490b-8a93-02cfae01036b SEARCH 8
uuid:50e65653-7525-485d-83bf-d293558c4264 ALIVE 32
uuid:50e65653-7525-485d-83bf-d293558c4264 BYEBYE 8
uuid:55076f6e-6b79-4d65-6497-180373763bc1 ALIVE 113
uuid:55076f6e-6b79-4d65-6497-180373763bc1 BYEBYE 112
uuid:55076f6e-6b79-4d65-6497-180373763bc1 SEARCH 111
uuid:T0100203354 BYEBYE 2

I am using ubuntu for gcc/g+ compiler.

View 1 Replies View Related

C :: Reading And Printing In A Specific Format Strings Of Characters And Integers

Feb 23, 2015

I have been skimming and searching but dont know how to word the search just right to find what I need to know. I have written simple stuff with the support of tutorials like weight conversion or loops counting up to a set number. Nothing amazing. The other day I found out how to input and print a string rather than a single text character which i though was bad ass. I even got it to read multiple strings on a single line and found a way to read multiple lines. I can even format it to read both integers and characters on the same line as long as I know the predefined format.

On to my question... How do I read multiple lines with both carecters and integers. for instance:

nissan 1996
toyota 1998
or more comples like
nissan gtr 1996
toyota markii 1998

I want to use
int year;
char make[10]; maybe need to use char make[10][10]; for an array i would guess.
char model[10]; optional for the extra data

but reproduce what i read in a different order. say...
1996 nissan
1998 toyota
vice the original format.

this is what I have tried.

Code: scanf("%s %s", &make,&year);

//The way I seen to read multiple lines was on here

scanf("%[^/t]", %make);

But this wont let me separate the two into two differnet definded data types. Let alone use printf to display them in reverse order.

View 1 Replies View Related

C++ :: Encrypting With User-Given Key?

May 3, 2013

I am working on a program where a user first enters a key of 26 characters, they then choose the number of lines they'd like to use with a max length of 40. Once they have entered the key and chosen the number of lines, they then enter text into the chosen number of lines, before that text is ultimately encrypted. I have it working as far as accepting the user's 26-character key, accepting their choice for number of lines, but when the user is typing in their lines of text, it only allows 6 lines before it moves to where the text would be encrypted.

View 3 Replies View Related

C++ ::  Decrypting And Encrypting Following A Certain Protocol?

Mar 26, 2014

I have a certain method of encrypting text. You get the first character of the word. For example in the word "hacker", you get 'h', and then you get the last character 'r'. The encrypted word until now is "hr". Then we get the same word with the 'h' and 'r' removed, now it's "acke". I do the same thing and get the first character 'a' and the last one 'e' and them to the encrypted word: it is now "hrae".

The left letters of the word are "ck", again we do the same thing and take the first character 'c' and the last character 'k' and and add them to the new encrypted word so it is "hraeck". The above word has an even number of characters and at the end had 2 characters left 'c' and 'k',first and last, in some cases of words with an odd number of characters, only one character is left! I'm completely lost on how to encrypt and decrypt this.

View 4 Replies View Related

C++ :: Encrypting / Decrypting Strings

Jul 16, 2013

I have a simple decryption program but I cant get it to encrypt/decrypt text read from the keyboard using getline (), did i declare wrong?

#include <iostream>
#include <string>
using namespace std;
char text[ ]

(here I have my void decrypt/encrypt functions)

int main () {
cout <<''Enter text to encrypt''<<endl;
getline(cin,text);

View 3 Replies View Related

C++ :: Encrypting MAC Address To 4 Digit Number

Apr 4, 2014

I want to encrypt Mac address to 4 digit number which can be decrypted to original MAC address.

View 9 Replies View Related

C :: What Is Left Most Asterisk Doing

Apr 1, 2014

I encounter this from a library:

( *(reg8 *)(pinPC) |= CY_PINS_PC_DATAOUT)

From my understand the cast (reg8 *) applies to the result of the bitwise OR. But what is the left most asterisk doing?Is it just dereferencing the casted pointer?

View 1 Replies View Related

C++ :: Asterisk Bar Graph

Feb 12, 2014

i have to make a programs that prompts the user to enter quiz grades and add them up. For examples the user enters 6 test grades they are out of 5 so he enters 0-5 and i store them in the array. This part works great but now i have to print out a bar of vertical asterisks for every part too. So if at the end we have one test grades that are 2 grades of 1 points, 1 grade of two point, 2 grades of three point and 1 grade of 5 point it will have to display them as this

There are 2 grades of 1
There are 1 grades of 2
There are 2 grades of 3
There are 1 grades of 5

i need to do for loops but i am stuck on what to count too and what to print i know i will need cout << "*" and a couple of spaces.

#include <iostream>
using namespace std;
int main (){
int size;
int tests;
int a[6]={0};

cout << "How many quiz scores will you enter: ";
cin >> size;

[code]....

View 1 Replies View Related

C :: How To Change The Numbers Into Asterisk

Oct 10, 2014

i have my basic C program here (i'm new to C language):

Code:

#include <stdio.h>
int main()
{
int grade;
int A=0;
int B=0;
int C=0;
int D=0;
int E=0;

[Code]....

As you can see, it's only for counting how many students got the grades from A to E, but the problem is that i need to change it from numbers into asterisk

for example: 4 students got the grade A, and 3 students got the grade B

instead of displaying

A=4
B=3

i want it to display

A=****
B=***

View 11 Replies View Related

C :: Nested Loops - Asterisk Diamond

Jul 11, 2013

Getting close but I think I am stuck on the second loop. The input you put in will be doubled (and it's not supposed to).

Code:
int main() {
int n, i, j, k;
printf("What would you like the height to be? (Positive odd integer)
");
scanf("%d", &n);

[Code] .....

View 3 Replies View Related

C++ :: Place Two Asterisk Triangles On Top Of Each Other But Only Using 3 For Statements

Oct 19, 2014

I have to place two asterisk triangles on top of each other BUT only using 3 for statements. I have gotten the first one:

for(int a=1;a<=10;a++) {
for(int b=1;b<=a;b++)
cout << "*";
cout << endl;
}

I need the output to look like this:
*
**
***
****
*****
******
*******
********
*********
**********
*
**
***
****
*****
******
*******
********
*********
**********

The only kicker is I can have a total of 3 nested for loop statements.

View 7 Replies View Related

C/C++ :: Stopping Case For Asterisk Pattern?

Dec 1, 2014

So, I'm going to write a recursive function for a asterisk pattern but I'm stuck figuring out how to create a stopping case for it, better yet, I'm unable to describe the pattern completely.

*
**
-*
****
--*
--**
---*
********
-----*
-----**
------*
-----****
-------*
-------**
--------*

( - represent white spaces )

What I've been thinking:

* Every odd row has 1 * with 1 incremented white space

* Every "pair" of asterisks equals 8 total (EX. 8 one pair *'s, 4 two pair *'s, 2 four pair *'s)

Unfortunately, that's all I got. how I can represent this as I function. Once I figure out what my stopping case should be, I think I can do the coding on my own.

View 1 Replies View Related

C++ :: Why Asterisk Required On Smart Pointers For Assigning Value

May 19, 2013

When i try to compile this code it gives me a error during run-time saying "*program name* has stopped working"

Code:
#include <iostream>
#include <memory>
using std::cout;
using std::endl;
using std::unique_ptr;

[Code] .....

Why is this happening? Also why do you need the asterisk on smart pointers to assign them a value? Is it just because, or is there a reason.

View 5 Replies View Related

C++ :: Utilizing Arrays Create Vertical Asterisk Graph?

Jun 25, 2013

This program needs to display a vertical graph of asterisks showing production for each plant in the company ...

Here is what I have so far:

***********************************
This program will read data and
display a vertical graph showing
productivity for each plant.
Reference Display 7.8 pg. 401-3
***********************************
*/
#include <iostream>

[Code].....

View 1 Replies View Related

C++ :: Encrypting Contents From File And Saving To Another File

Mar 17, 2013

Right now I'm working on an assignment where I need to take the data from on file encrypt it by adding 5 to each byte and then save it to a user specified location. I think I'm close to having it done but I've run into a hick up. After I get the user input for where the encrypted data should be saved the program seems to never end. This is the code I have so far

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream input;
ofstream output;

[Code]...

View 1 Replies View Related

C++ :: How To Use Backspace In Password

May 17, 2014

[URL]

#include <iostream>
#include <string>
#include <conio.h>

[Code].....

the code use in above link is good but one problem i cant able to use backspace to remove mistake if user made any mistake he cant able to remove the mistaken character

View 2 Replies View Related

C :: Comparing Password With Strcmp

Oct 7, 2013

I'm a novice with C programming and i have to solve an error in the following code. The code works like you enter a password called "uoc" and it shows as OK. But surprisely when you entered another password as "Cambridge" it works fine too.

I think that the problem is in the array declaration but i'm checking resources and no success!

Code:
#include <stdio.h>
#include <string.h>
struct {
char str[8];
char ok;
} data;

[Code] ......

View 3 Replies View Related

C :: Reading Password From A File

Jan 10, 2015

I am trying to read a "password" from a file, the file only contains the password... Here is my code:

int i=0, ch;
char password[25];
FILE *fp = fopen("C:UsersOlintoDocumentsNetBeansProjects est.txt", "r");
if (fp == NULL)
printf("Erro ao Abrir");

[Code] ....

puts(password); When I read the string password, it outputs -> abcd123"

I don't know where it takes the (") because the password on the file is abcd123...

View 2 Replies View Related

C++ :: Username And Password Verification?

Jun 7, 2014

this is really important i searched an example code about "Username and Password Validation between Server and Client" through internet a LOT and i couldn't find anything..

View 3 Replies View Related

C++ :: How To Create Login ID And Password

May 30, 2014

"How to create login id and password" because i have to submit this assignment next weeks i dont know how to using passing by value or reference corectly/

For the Ouput its say this :

1>ClCompile:
1> GILA DAH!!.cpp
1>d:computer programmin ditg 1113jiwa ku sakitjiwa ku sakitGILA DAH!!.cpp(21): error C2664: 'strlen' : cannot convert parameter 1 from 'char' to 'const char *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>
1>Build FAILED.

#include <iostream>
#include <string>
using namespace std; //introduces namespace std
void length(char[]);

[Code]...

View 1 Replies View Related

C++ :: Masking And Attempts On Password

Sep 9, 2013

Ive been working on a program that can mask the password and has 3 attempts. So far I can't do both at the same time. Here is my work. How can I do both?

#include<iostream>
#include<string.h>
#include<conio.h>
using namespace std;
int main() {
string _pass;
char input;

[Code] .....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved