No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
string word = "abcde"; int count = 0; for(int i = 0; i < word.length(); i++){ for(int j = 1; j < word.length(); j++){ if(word.at(i) == word.at(j)){ count++; } } } i am trying to write a program that when i am given a string i can count letter pairs … |
|
Re:
I am trying to make a calculator in C++ but I keep running into errors. Please help me. Here is the code: #include <iostream> #include <cmath> #include <string> using namespace std; int main() { //what the variables are double calculation; double sign; double number1; double number2; //the questions cout<<"Enter a … |
|
Re:
Hello everyone at Daniweb! This is my first post here, sorry if i do something wrong. Ok, so just a quick background on me and where I'm at in java. This year I'm taking my first Comp Sci class as CSUN (Cal State University Northridge). I am a complete beginner … |
|
I have a tic tac toe board i am finding it hard to figure out how to change parts of the array that contains char. I am looking for a way to to ask the user to select a char to change in the the array and then once they … |
|
Re:
Hi i am looking for following output.I am just getting 0 for a,b,c,d,f. total no of grades Number of A's Number of B Numbers of C Number of D number of F [CODE]import java.util.Scanner; public class ExamScores { public static void main (String[]args) { String a; int count= 0; int … |