answersLogoWhite

0


Best Answer

#include<iostream>

#include<string>

#include<algorithm>

bool compare_no_case (const char a, const char b)

{

return tolower(a) < towlower (b);

}

int main()

{

std::string s {"This is the string to be sorted!"};

std::cout << "Unsorted:\t"" << s << ""\n";

std::sort (s.begin(), s.end(), compare_no_case);

std::cout << "Sorted\t:"" << s << ""\n";

}

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

#include<iostream.h>

#include<conio.h>

void main()

{

int i;

char j;

clrscr();

for(i=97;i<102;i++)

{

for(j=97;j<=i;j++)

{

cout<<j;

}

cout<<endl;

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago
#include
using namespace std;


int reverse(int input);


int main() {

cout << reverse(1234) << endl;

}


int reverse(int input) {

int output = 0;

while(input != 0) {

output = output * 10 + input % 10;

input /= 10;

}

return output;

}



This answer is:
User Avatar

User Avatar

Wiki User

6y ago

for (char c='a'; c<='z'; ++c) std::cout << c;

for (char c='A'; c<='Z'; ++c) std::cout << c;

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

#include<iostream>

int main()

{ std::cout<<"a b a b c b a b c ....................."<<std::endl;

}

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

std::string s {"aaaa"};

for (int i=0; i<5; ++i) {

std::cout << s << " ";

s.pop.back();

s.append ('b');

}

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

std::string s {"abcde"};

while (!s.empty()) {

std::cout << s << " ";

s.pop_back();

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a c plus plus program to print aaaa aaab aabb abbb bbbb?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Any sample paper of visakhapatnam steel plant?

1. Four prime numbers are written in ascending order of their magnitudes the product of the first three is 385 and that of the last three is 1001. The largest given prime number is a. 11 b. 13 c. 17 d. 19 2. Mahavir deposited in the bank from Monday to Saturday the amounts of Rs. 87.80, Rs. 203.63, Rs. 3677.98, Rs. 92899.01, Rs. 66 and Rs. 554945.19 respectively. Find his total deposit for this week a. Rs. 651879.61 b. Rs. 652779.61 c. Rs. 650879.51 d. Rs. 655889.71 3. Amar deposited in Vijay Bank Rs. 259206.16 on Monday. Rs. 201890.48 on Tuesday, Rs. 284.16 on Wednesday. He withdrew Rs. 50000.00 on Thursday. He again deposited Rs. 230.01 on Friday and Rs. 72.62 on Saturday. Find his total balance in the bank for this week a. Rs. 501783.43 b. Rs. 501683.43 c. Rs. 511693.43 d. Rs. 511683.43 4. I was born on October 17, 1927. How old I was on Jan. 26, 1978? a. 49 years and 101 days b. 50 years and 100 days c. 50 years and 101 days d. 50 years and 103 days 5. Find the total of the following amount Rs. 1230.79, Rs. 11368.08, Rs. 203.63, Rs. 10314.89, Rs. 64.8, Rs. 101.00 and Rs. 3677.98 a. Rs. 27961.1 b. Rs. 26961.17 c. Rs. 26951.17 d. Rs. 25961.17 6. How many pieces, each of length 4.5 m can be cut of 225 m of wire? a. 40 b. 54 c. 56 d. 50 7. Parkash and Girish were travelling together. Prakash paid Rs. 200 for their stay in a hotel and Girish paid taxi fare of Rs. 80. If they have to share these expenses equally, then a. Prakash should pay Rs. 60 to Girish b. Girish should pay Rs. 120 to Prakash c. Girish should pay Rs. 60 to Prakash d. Prakash should pay Rs. 120 to Girish 8. Sum of the numbers from 1 to 20 is a. 210 b. 110 c. 220 d. 105 9. Which of the following is equal to 115 x 15? a. 105 x 10 + 115 x 5 b. 11 x 515 c. 1151 x 5 d. 110 x 15 + 5 x 15 10. The unit's digit in the sum (264)102 + (264)103 is a. 0 b. 4 c. 6 d. 8 11. The smallest natural number by which the product of 3 consecutive even numbers is always divisible is a. 16 b. 32 c. 48 d. 96 12. The number of prime factors of (6)10 x (7)17 x (55)27 is a. 54 b. 64 c. 81 d. 91 13. The total income of Hazari and Murari is Rs. 3000. Hazari spends 60% of his income and Murari spends 80% of his income. If their savings are equal. Find the income of Hazari a. Rs. 2000 b. Rs. 3000 c. Rs. 1500 d. Rs. 1000 14. Bholanath save 25% if his income, but due to dearness the expenses increased by 25%, still he saves Rs. 30. Find his income a. Rs. 400 b. Rs. 480 c. Rs. 450 d. Rs. 475 15. In a city 40% of the people are illiterate and 60% are poor. Among the rich 10% are illiterate. What percentage of the poor population is illiterate? a. 36% b. 60% c. 40% d. None of these Section - II Mental Aptitude (Analytical Reasoning) Directions (Q 1-5): Find the missing characters from the following series 1. ab _ a _ b _ a _ bba a. aaab b. baba c. abba d. baab 2. _ bc _ _ bb _ aabc a. abab b. caab c. acac d. aaab 3. cc _ a _ cabccb _ cca _ c _ ba a. cbaba b. bacbc c. bcabc d. abcbc 4. cba _ cb _ ccb _ c _ a. caac b. cbca c. cbac d. cabc 5. AA _ cb _ AA _ _ bba _ ccb _ a. cabaac b. ababab c. cbccab d. aaabca 6. If day before yesterday was Sunday then next Monday will be after ____ days. a. 4 b. 5 c. 6 d. 7 7. If Sept 9 was Friday then the last Tuesday of the same Month will fall on a. 25 b. 26 c. 27 d. 28 8. If the month of May begins on Sunday then the third Friday will fall on a. 19 b. 20 c. 21 d. 22 9. If January 31 in a particular year falls on a Saturday then January 1 will be a. Sunday b. Tuesday c. Thursday d. Monday 10. At 6 PM the hour hand of a clock will point towards a. North b. South c. SW d. SE 11. A boy walked 400 m north from his home, then he turned right and walked 100 m, then he turned left and walked 500 m. in which direction is he walking now a. North b. South c. NE d. NW 12. A car starts from a point A. Then it moves 4 KM towards South. Then it turns right and moves 3 KM. How far is it from point A now. a. 3 KM b. 4 KM c. 5 KM d. 0 KM 13. 3, 10, 29, 66, _ a. 137 b. 127 c. 103 d. 218 14. 41, 29, 19, 11, _ a. 5 b. 6 c. 4 d. 3 15. ZXUQ : ACFJ : : NLIE : : a. KMQT b. KMPU c. LMPT d. KMPT Online Books for Vizag Steel Plant Management Trainee Recruitment Exam Answers Section - I Quantitative Aptitude (Arithmetic) 1. b, 2. a, 3. d, 4. c, 5. b 6. d, 7. c, 8. a, 9. d, 10. b 11. a, 12. d, 13. d, 14. b, 15. a Section - II Mental Aptitude (Analytical Reasoning) 1. b, 2. c, 3. c, 4. a, 5. c 6. c, 7. c, 8. b, 9. c, 10. b 11. a, 12. c, 13. b, 14. a, 15. d


Related questions

Rhyming scheme of off to outer space tomorrow morning?

first stanza -aaab


What are the note of Mary had a little lamb what staff for recorder?

bagabbb aaab high d high d bagabbbaabag


What rhyme scheme is johnny appleseed?

The rhyme scheme of the poem &quot;Johnny Appleseed&quot; by Reeve Lindbergh is AABBCCDD.


What is the date of dted cet 2012 in maharashtra?

exam hi nai hoga aaab...dosto padhna chod do ab.....


When was binary invented?

The idea of binary code came about in the late 1600s and is often credited to Gottfried Leibniz , a German mathematician and all round clever person. Francis Bacon was using a binary code with letters of the alphabet as a cipher, so aaab aabb etc exactly the same as binary, this is in his book The Advancement of Learning.


Do have to put divorce on a job application?

You do NOT need to put divorce on a job application unless you feel it in some way specifically answers something related to work AND that you can tie it into a positive outcome related to working. For example: Ms. Y worked at AaaB Fitness until her then-husband began stalking her at work. She left AaaB Fitness so she could deal with this personal matter, which was resolved through divorce and court. Ms. Y's ex-husband went to jail for threatening her. She has moved to a new state and is eager to work. BUT NOTE-- Any topic you open means an interviewer can ask follow-up questions. So it's really better NOT to bring it up unless there is an important reason. Even my example above is NOT a very good reason.


Assume you were reading a poem The first four lines ended with the words love hate dove great?

It sounds like the poet is using a rhyme scheme with the words &quot;love,&quot; &quot;hate,&quot; &quot;dove,&quot; and &quot;great.&quot; The repetition of these rhyming words may suggest a thematic connection between ideas of love, hate, doves, and greatness, or create a sense of rhythm and harmony in the poem.


What are the tamagotchi phone numbers?

These are for version 4 and I dont know if they work on any other version: Parent: AABA CCBB Grandparent: CCAC BCBA Preschool teacher: AACC CABA Turtle teacher: ACCB CAAB Flower teacher: CBBC BABB Canvas teacher: BBAC CAAB Tamagotchi king: BABC AAAB All of these work! But your tamagotchi must be an adult to use the phone and you have to have a parent or grandparent to call them! LOL! hope I helped you! :)


What represents the form of call-and-response?

The form of call-and-response is represented by alternating vocal or instrumental phrases, where one person or group sings or plays a phrase (&quot;call&quot;) and another person or group responds with a different phrase (&quot;response&quot;). It is commonly used in various musical traditions, such as gospel, blues, jazz, and even in some African and Native American music.


What are the tamagotchi cell phone codes?

The list of Cell Phone numbers we've found so far: AABA CCBB = Parent * CCAC BCBA = Grandparent * AACC CABA = Preschool Teacher ACCB CAAB = Turtle Teacher CBBC BABB = Flower Teacher BBAC CAAB = Canvas Teacher BABC AAAB = Tama King *Must be more than first generation Veh~ I hope you find these useful -.&bull; I have a tama that looks like a strawberry. I think it'd be cool to have one that looks like pasta ;D Tamagotchi is fun :D


What is the meaning of alternate rhyme?

Alternate rhyming is also called "cross rhyming", meaning the lines alternate between two rhyming words as in abab. The effect created is that of an echo or a return to the rhyme in a pattern that makes the ear expect the rhyme without being as repetitious as a string of couplets. In other words, it delays the rhyme by inserting another rhyme as in a cross stitch or a round, where you have two rhyming words that "cross" between each other. For example: All I have I give to you you mean the world to me and everything I say or do I do so willingly There are often terms for a specific style or rhyme pattern that most people don't know because they use their ears and memory and don't really study the form. For example, the pattern abba is also called "envelope rhyme", or "arched rhyme" meaning the couplet in the middle, "bb", is enveloped withing the outer rhyme of "a__a", or that the pattern creates an "arch". The pattern "ababbcc" is called "rhyme royal", and "aaab cccb" is called "chain rhyme". Each of these, in combination with the meter or cadence of the poem, creates a specific mood, tone or feeling. This is why it's important to match the style of the poem to the topic and effect you want to create. You wouldn't want to write a serious poem about death using a nursery rhyme style...unless you were trying to create a specific feeling that required the apparent mis-match of topic and style. --GINALYN USON TAN-- ..SEHS..


What are tamagotchi v4 codes?

1st enter BCAA CBAB 2nd enter BBAA ABCB 3rd enter BABC BAAA 4th enter CAAC BAAA and finally to get the rare cell phone, but you have to put all these codes in first in order to get the rare cell phone, finally type in CCCA CBBC.